Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a page tell browsers that an AMP HTML version exists?

Tags:

amp-html

I understand I will have two pages, the AMP one and the regular one. The AMP one has a canonical link to the regular one, but how does the regular one specify that there is a AMP version available?

like image 430
Designer023 Avatar asked Oct 08 '15 09:10

Designer023


People also ask

How do you check if a page is AMP or not?

You can use the AMP Test to check the validity of an AMP page, and to verify that it has the proper configuration to appear in Google Search results. Note: If you want to confirm whether your AMP pages are indexed correctly, we recommend using the URL inspection tool instead of the AMP Test tool.

What is AMP in HTML?

AMP (originally an acronym for Accelerated Mobile Pages) is an open source HTML framework developed by the AMP Open Source Project. It was originally created by Google as a competitor to Facebook Instant Articles and Apple News. AMP is optimized for mobile web browsing and intended to help webpages load faster.

How do I fix referenced AMP URL is not an AMP?

You have your canonical and amphtml links set-up correctly though, and the AMP Test detects the amphtml link if you run your non-AMP page through it - it's just your re-direct kills it I think. If you drop the 302 re-direct you're doing and run the AMP Test again it will probably validate.


1 Answers

The AMP document discovery documentation specifies that you need to add this tag in the <head>:

<link rel="amphtml" href="...">

As an example, if you take a look at a page from a publisher that already supports AMP, such as http://www.bbc.co.uk/news/world-europe-34471849, you can see this tag in the <head>:

<link rel="amphtml" href="http://www.bbc.co.uk/news/amp/34471849">
like image 135
edlea Avatar answered Oct 09 '22 23:10

edlea