cloudflare / cloudflare-docs-engine

A documentation engine built on Gatsby, powering Cloudflare’s docs https://github.com/cloudflare/cloudflare-docs
https://developers.cloudflare.com/docs-engine
Apache License 2.0
221 stars 89 forks source link

Add canonical tags across product pages #365

Closed adesege closed 2 years ago

adesege commented 2 years ago

Why?

Google sees www.developers.cloudflare.com/bots/about and www.developers.cloudflare.com/bots/about/ as two different pages which can affect the page rank.

What?

This PR adds canonical tags across pages for urls ending with slash so as to improve our page rank. Query strings from urls are also stripped. gatsby-plugin-canonical-urls is used to achieve this.

How?

See the How section of https://github.com/cloudflare/cloudflare-docs/pull/2599

pedrosousa commented 2 years ago

FYI: We're getting this warning during builds: warning Plugin gatsby-plugin-canonical-urls is not compatible with your gatsby version 2.24.7 - It requires gatsby@^4.0.0-next

adesege commented 2 years ago

Hi @pedrosousa, thank you for your patience.

Your feedback is being addressed in https://github.com/cloudflare/cloudflare-docs-engine/pull/370.

Thanks.