rel-canonical

From IndieWeb


rel=canonical is a way to indicate that a hyperlink links to the original and canonical version of the current page.

Compare rel=canonical with rel=alternate.

Why

You should use rel=canonical to reduce, minimize, and ideally eliminate any duplicate search results for your pages, i.e. you should canonicalize the following variants of your homepage and permalinks:

How to

Put a link rel=canonical in the head of your homepage and permalinks pages, e.g.:

<link rel=canonical href="https://you.example.com/permalink" />

IndieWeb Examples

Tantek

Tantek Γ‡elik has had rel=canonical support for a while from his homepage and permalinks to their plain versions without any "?" query, and for the permalinks with the explicit URL slug. On 2019-272 he added support for http: pages to link rel-canonical explicitly to the https version of the URL so that Google Search and other search engines would prefer the https versions and avoid duplicate indexing of permalinks.

gRegor Morrill

gRegor Morrill has had rel-canonical on gregorlove.com since approximately 2016. Using ProcessWire I found it easy to add the canonical URL for every page. It links to the https version of the URL.

add yourself!

See Also

Related