Canonical Tags and Duplicate URLs: A Field Guide
The same content is usually reachable at more than one URL. Tracking parameters, session ids, uppercase paths, trailing slashes, print views, and faceted filters all produce duplicates that nobody intended. rel="canonical" is how you tell Google which one of them is the real page, so the ranking signals land on a single URL instead of being spread across five.
It is a hint, not a directive
Google treats your canonical as a strong signal and usually respects it, but it selects the canonical itself, weighing internal links, redirects, sitemaps, and hreflang alongside the tag. When those signals contradict each other, Google picks, and you may not like the answer. Consistency is what makes the tag reliable.
When you need one
- Parameter variants:
?utm_source=,?ref=,?sessionid=, sort and filter parameters. - Protocol and host variants: http and https, www and bare domain, if both resolve.
- Path variants: trailing slash and not, differing case,
index.htmland the directory. - Print or AMP-style alternates of the same article.
- Syndicated content, where the canonical points to the original publisher.
- Every other page, as a self-referencing canonical. It costs nothing and forecloses surprises.
<!-- The primary URL, pointing at itself -->
<link rel="canonical" href="https://example.com/learn/canonical-tags" />
<!-- The same page reached with tracking parameters, pointing at the clean URL -->
<link rel="canonical" href="https://example.com/learn/canonical-tags" />
Rules that keep it working
- Absolute URLs: always include the scheme and host. A relative canonical resolves against the document base and breaks in ways that are hard to see.
- One per page: two canonical tags, or a tag that disagrees with an HTTP
Linkheader, means Google ignores both and decides for itself. - The target must return 200 and be indexable: canonicalizing to a redirect, a 404, or a
noindexpage discards the page you were trying to consolidate. - No chains: point at the final canonical, not at another page that canonicalizes elsewhere.
- Never combine canonical with noindex on the same URL: one says "consolidate me into that page", the other says "forget me". The instructions conflict and the outcome is unpredictable.
- Agree with everything else: internal links, the XML sitemap, redirects, and hreflang should all name the same URL. One stale sitemap entry is enough to muddy the signal.
Breakages worth looking for
| Symptom | Usual cause | Fix |
|---|---|---|
| Every page canonicalizes to the homepage | a hardcoded value in a template or a misconfigured SEO plugin | generate the canonical from the page URL. This one can deindex a whole site |
| Canonical includes tracking parameters | built from location.href at runtime | build it from the clean route, server side |
| Canonical points to a 301 | a URL change that updated redirects but not the tag | point at the destination |
| Canonical and hreflang disagree | alternates declared on parameter variants | declare hreflang only on canonical URLs. See hreflang |
| Paginated pages all canonicalize to page 1 | a habit left over from rel="prev" and rel="next" | each page in a sequence should canonicalize to itself. Pages 2 and beyond are not duplicates of page 1 |
| http canonical on an https page | a migration that missed the tag | update to https everywhere, including sitemaps |
Canonical, 301, noindex, or robots.txt
| Tool | Use it when | Effect on signals |
|---|---|---|
rel="canonical" | duplicates that must all stay reachable | consolidates signals onto the canonical URL |
| 301 redirect | the duplicate does not need to exist any more | consolidates signals, and is stronger than a canonical |
noindex | the page must exist for users but must not rank | removes it from the index. It does not consolidate anything |
robots.txt Disallow | crawling itself is the problem, for example infinite faceted URLs | blocks crawling, so Google cannot see your canonical or your noindex either |
How to check a page
- Read the canonical from the rendered DOM, and check the HTTP headers for a
Link: rel="canonical"that might contradict it. - Confirm it is absolute, and that it matches the URL you consider primary, down to the trailing slash and the case.
- Load the canonical target and confirm 200 and indexable.
- Confirm there is exactly one canonical element on the page.
- Confirm the page is not also
noindex. - In Search Console, use the URL Inspection tool: it shows the canonical you declared next to the one Google selected. A mismatch is the signal to chase.
Duplicate content is not a penalty. Google filters duplicates and picks one URL to show. The cost is not punishment, it is dilution: signals split across variants, and sometimes the version that gets shown is not the one you optimized.
Common questions
Is rel=canonical a directive?
No, it is a hint. Google considers it alongside redirects, internal links, sitemaps, and hreflang when selecting a canonical URL, and it can choose differently. When it does, that usually means your other signals contradict the tag.
Canonical or 301 redirect?
If the duplicate URL does not need to stay reachable, redirect it: a 301 is the stronger and clearer signal. Use a canonical when both URLs must keep working, which is the normal case for tracking parameters, filters, and print views.
Should paginated pages canonicalize to page one?
No. Page two of a listing is different content from page one, so each page should canonicalize to itself. Canonicalizing a sequence to its first page tells Google to ignore the rest, and anything only linked from those pages loses its path.
Why does Search Console say "Alternate page with proper canonical tag"?
That is the expected state for a duplicate URL that correctly points at its canonical. Google saw the variant, followed your tag, and indexed the canonical instead. It only needs investigating if the URL reported as an alternate is the one you wanted indexed.