Kevin Marks (Editor)
rel=canonical is a link relation to indicate the canonical URL of the current page, to avoid duplicate content.
Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2022-01-26, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.
rel="canonical" to a hyperlink, a page indicates that the destination of that hyperlink SHOULD be considered the preferred or definitive version of the current page. This helps search engines avoid duplicate content, and is useful for deciding how to link to a page when citing it.
There are many reasons for a site to serve the same content at multiple URLs, but duplicate pages are undesirable in search results. The historic recommendation was to use 301 redirects to the canonical page, but that can be jarring for users. There are many use cases for a URL to have additional information added as query parameters or fragments to indicate the navigation history for referral purposes, but would prefer a single main referent from searches. This was codified in February 2009 as rel=canonical, and adopted by many search engines.
Search engines prefer
rel=canonical on a
<link> element, and will ignore it on an
The opposite of canonical
There are several ways of indicating non-canonical versions of a page, depending on what is intended. A non-comprehensive list
rel-syndication and u-syndication link to copies that the author has syndicated or shared onto other sites. The syndicated copies SHOULD have a rel-canonical link back to the original if the other site allows it.
rel-alternate is used to link to versions of the page in other forms, whether a different format with
type, language with
hreflang or presentation medium with
rel="shortlink" is used to link to a url shortened version designed for sharing and (often) tracking.
rel="me" is explicitly saying that another domain or page represents the same person or organisation as the current page. As such it is a different level of abstraction from rel-canonical, as it refers to the representation rather than the content.