rel=canonical
`rel="canonical"` is the HTML attribute declaring which URL is the preferred version among duplicates or near-duplicates. It's the technical mechanism behind the canonical-tag concept. Available as `<link rel="canonical">`, as an HTTP `Link` header, and implicitly via XML sitemap entries.
Long definition
rel="canonical" is a value of the rel attribute — the same attribute that carries rel="nofollow", rel="next", rel="prev", and rel="alternate". In the canonical family there are three delivery mechanisms, all equivalent in meaning:
1. <link> tag in HTML head:
<link rel="canonical" href="https://example.com/page">
2. HTTP Link header (for non-HTML resources like PDFs):
Link: <https://example.com/doc.pdf>; rel="canonical"
3. Implicit via sitemap — the URL listed in your XML sitemap is treated as a weak canonical hint, especially when combined with consistent internal linking.
The URL in the href must be absolute (full protocol + host + path). Relative URLs are accepted but invite the browser's current URL being used as the base, which can produce surprises. Always use absolute.
Special cases:
- Self-canonical: a URL canonicals to itself. The modern default for the canonical version of a page. Avoids ambiguity when parameters are appended (UTM, ref, tracking).
- Cross-domain canonical: allowed but treated with more skepticism. Useful for syndication — the original publisher's URL as canonical on partner reposts.
- Chained canonical: A → canonical → B → canonical → C. Google tries to follow the chain but will pick its own after 3-5 hops or conflicting signals.
For the broader concept, semantics, and misuse patterns, see canonical-tag.
Common misconceptions
- "rel=canonical and the
<link>tag are different things." They're the same thing from two angles. The<link>is the tag;rel="canonical"is the attribute on it declaring its purpose. - "Canonical URLs must exist on the same domain." Cross-domain canonicals are allowed and useful (syndicated articles pointing back to the original publisher). Slower consolidation and higher override rate, but it works.
- "Using rel=canonical and noindex together is fine." It's mixed signals. Google generally respects
noindexovercanonicalwhen they conflict — but don't combine them on the same URL. Pick the right tool:noindexto drop from index,canonicalto consolidate duplicates. - "rel=canonical works for all search engines." Google, Bing, and Yandex honor it. Smaller crawlers may not. If cross-engine consistency matters (e.g. Baidu for the Chinese market), use redirects where you need hard consolidation.
Continue exploring