Why Duplicates Happen
- Parameters:
?utm_source=…,?sort=price, session IDs. - Host and protocol variants:
httpvshttps,wwwvs no www, trailing slashes, uppercase paths. - Products in several categories, printer versions, AMP pages, syndicated articles.
Without a hint, Google picks a canonical itself, which can split signals or show the URL you didn’t want.
How to Declare it
HTML
<link rel="canonical" href="https://www.example.com/shoes/red-sneakers/" />In the <head>, with an absolute URL. One per page.
HTTP Header
Link: <https://www.example.com/whitepaper.pdf>; rel="canonical"For PDFs and other non-HTML files.
Other Signals Google Combines with it
- 301 / 308 redirects: the strongest signal, for URLs that should disappear.
- Only canonical URLs in the XML sitemap.
- Consistent internal links to the canonical version.
- HTTPS preferred over HTTP; shorter, cleaner URLs preferred.
Self-Referencing Canonicals
Every indexable page should point to itself. It protects against parameter and tracking variants that other sites or campaigns create.
Mistakes That Break it
- Pointing to a page that redirects, 404s or is noindex: Google ignores the hint and picks its own.
- Canonicalising paginated pages to page 1: items on pages 2+ lose their only path; give each page a self-canonical.
- Mixing signals: a canonical to A, a sitemap listing B and internal links to C.
- noindex plus a canonical to another page: contradictory; use one or the other.
- Canonicals added by JavaScript that differ from the HTML’s: Google may use either. Compare raw and rendered in Fetch & Render.
- Relative URLs or several canonical tags (themes and plugins each adding one): Google may ignore all of them.
- Cross-language canonicals: translations aren’t duplicates; link them with hreflang and keep each self-canonical.
Checking Which URL Google Chose
In Google Search Console, the URL Inspection tool shows the user-declared canonical and the Google-selected canonical. When they differ, Google found stronger signals for another URL: fix the redirects, links and sitemap so they all agree.