🎯Canonical URLs: Solving Duplicate Content
How the rel=canonical tag works, when to use it, common mistakes that break canonicalization, and how Google handles duplicate content without it.
Duplicate content occurs when the same (or near-identical) content is accessible at multiple URLs. Google must choose one version to index and rank — often getting it wrong. The canonical tag is your explicit instruction to Google about which URL is the "master" version.
The rel=canonical Tag
<link rel="canonical" href="https://example.com/the-definitive-url/">Place this in the <head> of every page. For the canonical page itself, the canonical tag should point to itself (self-referencing canonical). This is correct and expected.
When Duplicates Happen
- HTTP vs HTTPS versions of the same page
- www vs non-www (example.com vs www.example.com)
- Trailing slash vs no trailing slash (/page/ vs /page)
- URL parameters: /page?sort=asc vs /page?sort=desc
- Print-friendly page versions
- Session IDs appended to URLs
- Content syndicated to other sites
Google treats canonical tags as strong hints, not hard commands. If your canonicalized page has substantially different content or no links pointing to it, Google may ignore the canonical. Fix the root cause — don't just add canonical tags and hope.
Common Mistakes
| Mistake | Problem | Fix |
|---|---|---|
| Canonical points to 404 | Broken signal, Google confused | Fix the 404 or update canonical |
| Canonical chain: A→B→C | Google may only follow one hop | Point directly to final URL |
| Non-canonical page has unique content | Content may never rank | Make it canonical or merge content |
| Different canonical per device | Contradicts mobile-first indexing | Use one canonical for all devices |
| Canonical conflicts with noindex | Contradictory signals | Choose one: noindex OR canonical |
Sitewide vs Page-Level
Beyond individual page canonicals, ensure your sitewide setup is consistent: all versions of the domain should 301-redirect to one canonical version. For example, http://www.example.com → https://example.com (non-www, HTTPS). This consolidates all link equity to a single domain.
References
- [1]Google: Consolidate duplicate URLs — Official guidance on rel=canonical — developers.google.com