Search code examples
amp-html

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


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?


Solution

  • 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">