Sample webpage: https://www.bloombergquint.com/politics/jyotiraditya-scindia-meets-prime-minister-even-as-congress-says-he-remains-incommunicado
If you check the source code you can see that AMP is present. The source code and Google AMP Test also confirm the same.
Source code:
Google AMP Testing tool
But the PSI api call gives me this error:
{
"urlErrors": [
{
"errorCode": "NO_AMP_URL",
"errorMessage": "No AMP URL for the request URL.",
"originalUrl": "https://www.bloombergquint.com/politics/jyotiraditya-scindia-meets-prime-minister-even-as-congress-says-he-remains-incommunicado"
}
]
}
Findings when debugging:
- The service worker is deleting the
rel="amphtml"snippet from the page source after JS is powered up. (Check the source code after page is loaded completely in view page source) - The
mainEntityofPagestructured data is set to the home page of the site (bloombergquint.com) instead of the story page. (bloombergquint.com/:story-slug) ThumbnailURLis missing from structured data(SD) but in the preview is working fine with SD testing tool. (In preview the page is shown as AMP also.)What are the parameters this API is checking. (API docs)
- If the API is a success, the PSI (pagespeed insights) will hopefully show the
AMP Url discoveredmessage?
Edit
If the source code has an absolute URL to the AMP page than a relative URL, it shows success. What's the recommended content for rel="amphtml?

