0

How do I link to an AMP HTML page in a normal HTML page.

The example on GitHub specifies a canonical page which I guess refers to the "normal" HTML page. https://github.com/ampproject/amphtml#how-does-amp-html-work

<link rel="canonical" href="hello-world.html" >

But how does the "normal" page link to the AMP HTML page ?

Alain Zelink
  • 889
  • 2
  • 15
  • 33

2 Answers2

5

according to niemanlab.org it’s done like this:

<link rel="amphtml" href="hello-its-an-amp-page.html">
diplix
  • 92
  • 5
1

Since I only write in AMP, the way to do it would be like this if my page name was index.html:

<link rel="canonical" href="index.html">

That way, it always refers to itself instead of a regular HTML page. If there are any doubts, use Google Chrome to test/validate the page by putting #development=1 at the end of the URL.

Robert Dewitt
  • 324
  • 5
  • 17