Let’s define what does it mean
The Canonical Link Relation?
In regard to the link relation type, “canonical” can be described informally as the author’s preferred version of a resource. More formally, the canonical link relation specifies the preferred IRI from a set of resources that return the context IRI’s content in duplicated form.link rel=”canonical” supported by several search engines, including Yahoo!, Bing, and Google.
According to the RFC 6596 – The Canonical Link Relation under section 3 “The Canonical Link Relation” – The target (canonical) IRI MAY:
- Specify a relative IRI (see [RFC3986], Section 4.2).
- Be self-referential (context IRI identical to target IRI).
- Exist on a different hostname or domain.
And as we can’t find any specified information on the AMP HTML Specification page we can state, that the only restriction is that:
The content of the AMP page and its canonical web page should be essentially the same. The text need not be identical, but the topic should be the same, and users should be able to accomplish the same tasks on both the AMP and the canonical page.
So, theoretically you code may look like that:
But what if the AMP page is one and the only?
Everything is simple – you still need to add canonical link, but pointing it to itself