Sahil Sharma
Sahil Sharma

Reputation: 4247

Google cdn changing the amp page canonical and few other tags

We have an AMP page for which google is changing few tags like canonical, robots when it's hosted it on google cdn.

1) Amp Page (Website hosted) https://www.bikewale.com/m/royalenfield-bikes/classic-350/amp/

2) Amp Page (Website hosted - source code) view-source:https://www.bikewale.com/m/royalenfield-bikes/classic-350/amp/

3) Amp Page (Google cdn) https://www.google.com/amp/s/www.bikewale.com/m/royalenfield-bikes/classic-350/amp/

4) Amp Page (Google cdn - source code) view-source:https://www.google.com/amp/s/www.bikewale.com/m/royalenfield-bikes/classic-350/amp/

There are a few problems here:

Upvotes: 0

Views: 103

Answers (1)

Sebastian Benz
Sebastian Benz

Reputation: 4288

The canonical in 2nd point mentioned above refers to non-AMP page. While on Google cdn - link in 4th point is referring to the AMP page. What is the reason for this?

You're using the wrong URL to test the AMP cache version (your link goes to the Google AMP Viewer). The correct cache URL is:

https://www-bikewale-com.cdn.ampproject.org/c/s/www.bikewale.com/m/royalenfield-bikes/classic-350/amp/

Here is a converter you can use to calculate cache URLs. The cached version includes the correct canonical reference:

<link href=https://www.bikewale.com/royalenfield-bikes/classic-350/ rel=canonical>

There is no robots tag in the URL mentioned in 2nd points while 4th point URL has a robots no follow tag. What is the reason?

This is to ensure that robots only crawl the canonical version on your own origin and not the cached version.

Upvotes: 0

Related Questions