Reference guide · technical-seo · Published 2026-08-15 · 3 min read
Canonical tags explained (rel=canonical)
Canonical tag guide: what rel=canonical does, why duplicate pages need one, and how to handle self-referencing and cross-domain canonicals.
- ·What a canonical is
- ·When to use one
- ·Common mistakes
What a canonical tag is
A canonical tag is an HTML link element that names the preferred URL for a page among several pages that look similar. Search engines use it as a strong hint about which version you want indexed, while leaving the alternatives crawlable and available to users.
The element lives in the <head> of the page and always uses rel="canonical", lowercase. It must point at the absolute, fully qualified URL you prefer. A relative or self-referencing canonical is valid, but an absolute one removes ambiguity for crawlers and makes http-versus-https and host mismatches behave predictably.
<link rel="canonical" href="https://example.com/widgets/blue/" />
Why duplicate content needs a canonical
When the same content is reachable at more than one URL, search engines may split signals across the copies and pick a version you do not want. A canonical tag consolidates those signals onto the single URL you nominate, so links, anchor text, and crawling converge on one page instead of several.
Common duplicates a canonical solves:
- The same article at
https://example.com/postandhttps://example.com/post?utm_source=x. - The same product under more than one category folder.
- A desktop and a printer-friendly variant of the same content.
- http and https copies during and after a protocol move.
For each group, every duplicate carries the same canonical pointer to the preferred URL.
Self-referencing canonicals
A page pointing its canonical at itself is healthy and recommended. The tag says "this exact URL is the version I want indexed", which helps a crawler avoid guessing between a page and its apparent duplicates. Most sites should add a self-referencing canonical to every canonical URL; put it on the preferred page, not only on the duplicates.
Cross-domain canonicals
You can point a canonical at a URL on a different domain, typically when syndicated content is a republished copy of an article you own elsewhere. Search results then favour the canonical domain you nominated. The trade-off is real: the hosting domain hands over its ranking influence to the target, so only use a cross-domain canonical when you actively want the syndicated copy to defer to the original.
http versus https and query parameters
- After moving to HTTPS, make sure every canonical uses the https URL, or your canonical will point at a version you consider retired.
- Trackers that append query parameters to the same content create duplicates; either canonicalize to the clean URL or tell crawlers to ignore those parameters.
- Make the canonical match the final redirect target. If
httpresolves tohttpsandwwwresolves to bare, the canonical should already be the post-redirect URL so the indirect hop is avoidable.
See how this sits next to redirects in the redirect guide and how the same idea applies to images in the image SEO guide.
Common mistakes
- Using
rel=canonicalwith capital letters or in the body rather than the<head>. - Pointing a canonical at a URL that 404s or redirects somewhere unexpected.
- Leaving a duplicate without any canonical, forcing the engine to choose.
- Canonicalizing near-identical but genuinely intended pages (that is a merge decision, not a canonical decision).
- Mixing canonicals with blocking robots on the same page so the signal cannot be read.
For the full treatment of diagnosing duplicate sets and choosing canonical versus a 301, read duplicate content and canonical conflicts.