Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google is caching the desktop page and not the AMP page #39306

Closed
thinkdifferent opened this issue Jul 28, 2023 · 5 comments
Closed

Google is caching the desktop page and not the AMP page #39306

thinkdifferent opened this issue Jul 28, 2023 · 5 comments

Comments

@thinkdifferent
Copy link

Description

Frequently but not always (there seems to be no pattern in this) Google is caching the desktop version of our page and not the amp version.
When this happens we noticed our news is not visible on Google news, we get a blank page

An example I collected 2 days ago: https://www.google.com/amp/s/www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238

Our amp pages have the same URL with /amp at the and, so the cache should have been:
https://www.google.com/amp/s/www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238/amp

A more recent example:

https://www-ilmeteo-it.cdn.ampproject.org/v/s/www.ilmeteo.it/notizie/meteo-agosto-sono-arrivate-le-previsioni-per-le-vacanze-guardate-cosa-pu-accadere-entro-ferragosto-133446?amp_js_v=0.1

Reproduction Steps

https://www-ilmeteo-it.cdn.ampproject.org/v/s/www.ilmeteo.it/notizie/meteo-agosto-sono-arrivate-le-previsioni-per-le-vacanze-guardate-cosa-pu-accadere-entro-ferragosto-133446?amp_js_v=0.1

this is not visible on google news.

The cache page should have been the amp version, ending with /amp

Relevant Logs

No response

Browser(s) Affected

Chrome, Firefox, Safari

OS(s) Affected

Bot Android and Iphone

Device(s) Affected

No response

AMP Version Affected

No response

@powerivq
Copy link
Contributor

powerivq commented Aug 7, 2023

Looking at your page. I notice this

<link rel="alternate" media="only screen and (max-width: 640px)" href="https://www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238/amp" /> 

As a first step, you can change it or add another link, according to https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/discovery:

<link rel="amphtml"  href="https://www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238/amp" /> 

This would inform search engines the link to the AMP version.

@powerivq powerivq self-assigned this Aug 7, 2023
@thinkdifferent
Copy link
Author

Looking at your page. I notice this

<link rel="alternate" media="only screen and (max-width: 640px)" href="https://www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238/amp" /> 

As a first step, you can change it or add another link, according to https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/discovery:

<link rel="amphtml"  href="https://www.ilmeteo.it/notizie/meteo-caldo-stop-e-in-arrivo-una-gran-rinfrescata-temperature-gi-anche-di-13c-gli-aggiornamenti-083238/amp" /> 

This would inform search engines the link to the AMP version.

It was present, we tried to remove it to see if it could solve the problem.

@thinkdifferent
Copy link
Author

We reinserted the amphtml metatag and the problem is still present.

But maybe we found the cause: it seems to be te javascript redirect from the desktop page to the amp page if the user agent is mobile.
Adding this redirect to other sections of our website caused the problem of desktop page cache by google also on that section.

@powerivq
Copy link
Contributor

powerivq commented Aug 9, 2023

@thinkdifferent I am not familiar with how the search part works, but that is an interesting finding. Thank you for that report!

@powerivq
Copy link
Contributor

Closing as a plausible solution has been found by the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants