🎯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.

Hugo Team·June 3, 2026
canonical urlrel canonicalduplicate contentcanonicalizationtechnical seo

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

html
<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
⚠️Canonical is a Hint, Not a Directive

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

MistakeProblemFix
Canonical points to 404Broken signal, Google confusedFix the 404 or update canonical
Canonical chain: A→B→CGoogle may only follow one hopPoint directly to final URL
Non-canonical page has unique contentContent may never rankMake it canonical or merge content
Different canonical per deviceContradicts mobile-first indexingUse one canonical for all devices
Canonical conflicts with noindexContradictory signalsChoose 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. [1]Google: Consolidate duplicate URLs — Official guidance on rel=canonical — developers.google.com

Your privacy matters

Hugo stores authentication tokens and your consent record. With your permission we may also show personalised ads via Google AdSense. ·