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?
Asked
Active
Viewed 1,419 times
1 Answers
13
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">

Dan Dascalescu
- 143,271
- 52
- 317
- 404

edlea
- 369
- 3
- 9
-
1If you go to the non amp page via a mobile device it renders the non amp page. Is there a way to force the mobile device to render the amp version of the page? – Rob Carroll Oct 08 '15 at 20:21
-
Why it don't use the content negotiating part of HTTP? – ArturoTena Oct 10 '15 at 03:48
-
There is a discussion about some slight tweaks to how this is done within the github bug pages: https://github.com/ampproject/amphtml/issues/498 – Mario Lurig Oct 12 '15 at 15:09
-
I wrote a quick and dirty chrome extension to allow quick switching from amp to regular - it's intended for developers and includes an option to force the #development=1 validation tag. https://chrome.google.com/webstore/detail/amplifier/ennckgigejppolagdoadgaaodkhopjnb – John Pettitt Jan 20 '16 at 16:24
-
How we set
inside the head of an amp pages, which depends upon URL path/route? – Анураг Пракаш Jul 25 '17 at 06:51