Canonical tags are one of the most misunderstood tools in SEO. Developers add them thinking they solve duplicate content, then get confused when Google ignores them. This guide explains exactly what canonicals do, when Google ignores them, and how to implement them correctly.
What a canonical tag does
A canonical tag is a hint — not a directive — that tells Google which URL you consider the "main" version of a page. When multiple URLs serve the same or very similar content, Google picks one to index and rank. A canonical helps you control which one wins.
<link rel="canonical" href="https://yoursite.com/the-real-url" />It goes in the <head> of the page. It must be an absolute URL. It can point to itself (self-referencing canonical), which is fine and recommended.
When to use canonicals
- URL parameter variants:
/products?color=blueand/products?color=redshow different products but might look like duplicates. Canonical both to/productsor their respective canonical URLs. - Print versions:
/article/slugand/article/slug/print— canonical the print version to the main URL. - HTTP vs HTTPS: If your site is accessible on both, canonical all HTTP pages to their HTTPS equivalents (and add a 301 redirect to fully solve it).
- Trailing slash variants:
/page/and/page— pick one and canonical the other. Do this server-side with a redirect too. - Syndicated content: If you publish your articles on Medium, dev.to, or other platforms, ask them to add a canonical pointing to your original URL.
- Pagination: On paginated series, each page can self-canonical. Avoid canonicalizing page 2+ to page 1 — that tells Google not to index the deeper pages.
When Google ignores your canonical
Google treats canonical as a hint, not a command. It will override your canonical if:
- The canonical URL returns a non-200 status code
- The canonical URL has a
noindexdirective - The canonical URL has significantly different content than the page declaring it
- The canonical points to a URL on a different domain without a proper cross-domain setup
- The page has conflicting signals (canonical says URL A, sitemap has URL B, internal links point to URL C)
This last point is the most common mistake. If your canonical says /page/ but all your internal links point to /page, Google sees inconsistent signals and may choose the version that gets more internal links.
Self-referencing canonicals: should you always add them?
Yes. Adding <link rel="canonical" href="[current URL]" />to every page is a best practice even when you don't have obvious duplicates. It protects you against:
- CDN or caching layers that might serve the same page on a different domain
- Third-party tools that embed or scrape your content
- URL parameter injection from analytics or tracking systems
Common implementation mistakes
- Relative URLs:
<link rel="canonical" href="/page" />works in most cases but is fragile. Always use absolute URLs. - Multiple canonical tags: If your page has two
<link rel="canonical">tags, Google ignores both. - Canonical in the body: It must be in
<head>. In<body>it's ignored. - Canonicalizing paginated pages to page 1: This tells Google not to index pages 2+. Each paginated page should self-canonical.
- Using canonical instead of 301 redirects:For pages you're replacing or retiring, a 301 redirect is stronger than a canonical. Use 301s for permanent redirects, canonicals for duplicate-content management.
How to verify your canonicals are working
In Google Search Console, URL Inspection → enter your URL → check "Google-selected canonical" vs "User-declared canonical." If they differ, Google has overridden your hint — investigate why.