If you recently started to receive warnings coming from the Google Search Console about AMP pages with errors and no longer valid, double check if your web server is using Cloudflare because all your troubles with AMP pages could be caused by that service.
Cloudflare offers several services including: cache, prefetch of web pages, AMP real URLs, etc
If you receive errors for the validation of AMP pages behind Cloudflare be sure to perform the following steps:
- Ensure that the 'AMP Real URL' feature is disabled
- Ensure that the ' Prefetch URLs' feature is disabled
- Ensure that 'Signed automatic exchanges (SXGs)' is disabled
- Purge the whole cache of Cloudflare
Check also the CloudFlare Caching, that could cause problem if set at 'Standard Level'. The Caching level could require to be switched to 'Ignore Query String' or totally disabled.
At this point, Cloudflare should no longer cause problems for AMP pages, so you should test them on https://search.google.com/test/amp. If the validation is back to normal, you can proceed to process errors in the Google Search Console by clicking on the 'Mark as fixed' button.
Is Cloudflare breaking AMP pages on my website?