01 What is rel=canonical?
A canonical tag is an HTML element that tells search engines which version of a URL is the "master" version when several URLs serve substantially the same content. It looks like this:
<link rel="canonical" href="https://example.com/products/blue-widget" />
Canonical tags solve a problem you might not realise you have: most websites accidentally generate dozens of URL variants for the same page — query parameters, tracking codes, session IDs, sort orders, paginated views. Without canonicals, every variant competes against the others in Google's index and your ranking signals fragment across them.
02 Why canonical tags matter
When Google sees the same content at multiple URLs, it has to pick one to index and serve in search results. If you don't specify which one is canonical, Google guesses — and the URL it picks may not be the one you want.
The canonical tag does three things at once:
- Consolidates ranking signals. Backlinks pointing to non-canonical variants pass their value to the canonical version.
- Prevents duplicate-content dilution across query parameter variants.
- Tells Google your preference when multiple URLs are valid (e.g.
/blog/postvs/blog/post?ref=newsletter).
One important nuance: a canonical tag is a hint, not a directive. Google can ignore it if other signals strongly suggest a different URL is the right canonical. In practice it usually obeys, but don't rely on canonicals to fix structural duplicate-content problems.
03 When to use canonical
Add a canonical tag in any of these situations:
- Self-referential canonical on every indexable page. Yes, every page should canonical to itself. This protects you from accidental URL parameters Google encounters in the wild.
- Tracking parameter variants:
?utm_source=newsletterURLs canonical to the clean URL. - HTTP and HTTPS, www and non-www: non-preferred versions canonical to the preferred one (alongside a 301 redirect).
- Paginated content: page 2, 3, 4… each canonical to itself, not back to page 1.
- Syndicated content: if a partner republishes your article, ask them to canonical back to your URL.
- Product variants: if you have one product with five colours at five URLs, canonical the variants to the master product page (or use parameter handling instead).
04 When NOT to use canonical
Canonical tags get misused as a catch-all for de-duplication. They're not. Don't use canonical when:
- The pages are genuinely different. Two product pages with different content shouldn't canonical to a single URL — they'll both fall out of the index.
- You want a page de-indexed. Use a
noindexmeta tag instead. Canonical doesn't reliably remove URLs from the index. - You want to redirect users. Use a 301 redirect. Canonicals don't redirect — they just hint at indexing preference.
- The content is paginated and meaningful at each level (e.g. blog page 2 has different posts from page 1). Canonicals to page 1 here cost you indexed pages.
05 How to implement
There are two valid ways to declare a canonical:
1. HTML <link> tag (most common)
Place inside <head>:
<link rel="canonical" href="https://example.com/page" />
2. HTTP Link header (for non-HTML resources)
For PDFs, images, or any non-HTML asset, use the HTTP header:
Link: <https://example.com/whitepaper.pdf>; rel="canonical"
Always use the absolute URL with the scheme (https://) and the canonical host. Relative URLs technically work but cause subtle bugs when CDNs or staging environments enter the picture.
06 Four common mistakes
These are the canonical bugs we see on roughly half the sites we audit.
Mistake 1: Canonicalising paginated archives to page 1
For years, Google supported rel="next"/rel="prev" pagination signals. Those are gone. The current best practice is for each paginated page to canonical to itself. Pointing page 2, 3, 4… all back to page 1 makes Google drop the deeper pages from the index — including all the content they contain.
Mistake 2: Canonicalising mobile to desktop URLs (or vice versa)
If you run separate m.example.com URLs, the mobile version should canonical to desktop, with desktop using rel="alternate" back to mobile. Most sites either skip this entirely or get the direction wrong.
Mistake 3: Canonical points to a redirect or 404
The canonical target must return a 200. If it 301-redirects, Google has to follow that redirect to find the real canonical, which weakens the signal. If it 404s, the canonical is silently ignored.
Mistake 4: Conflicting signals
A page that canonicals to one URL but is internally linked under another, sitemapped at a third, and has hreflang to a fourth gives Google five competing signals. It will pick its own answer, which is rarely the one you wanted. Make sure canonical, internal links, sitemaps and hreflang all agree.
07 How to audit your canonical setup
A clean canonical audit covers four checks:
- Does every indexable page have a canonical tag? Pages without one are at the mercy of Google's guesses.
- Is the canonical self-referential? For most pages, the canonical should equal the page's own URL.
- Does the canonical target return 200? Not 301, not 404 — 200.
- Do canonical, sitemap and internal links agree? Google should see one canonical answer from every signal.
Smart SEO Audit checks all four automatically and flags conflicts in the audit report. Run an audit on any URL to see your current state.
? Frequently asked questions
Is a canonical tag a directive or a hint?
It's a hint, not a directive. Google usually obeys it, but can ignore it if other signals strongly suggest a different URL is the real canonical. Don't rely on canonicals to fix structural duplicate-content problems — they consolidate signals and express preference, but they don't force indexing.
Should every page have a self-referential canonical?
Yes. Every indexable page should canonical to itself. This protects you from accidental URL parameters Google encounters in the wild (tracking codes, session IDs, sort orders) by telling it which clean URL is the master version.
Can I use a canonical tag to remove a page from Google?
No. Canonical tags don't reliably de-index pages and they don't redirect users. Use a noindex meta tag to keep a page out of the index, and a 301 redirect to send users (and signals) to another URL. Canonical only hints at which duplicate to index.
→ Related guides
Keep going — these companion guides go deeper on related topics.