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 ?

0

2 Answers 2

5

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

<link rel="amphtml" href="hello-its-an-amp-page.html">
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.