Advanced SEO
Canonical URLs

Canonical URLs

A canonical URL is the preferred version of a web page that you want search engines to index. Canonical tags help prevent duplicate content issues when the same or similar content is accessible via multiple URLs.

What is a Canonical Tag?

<head>
  <link rel="canonical" href="https://example.com/preferred-page/" />
</head>

The canonical tag tells search engines: "If you find similar content on multiple URLs, treat this one as the original."

When to Use Canonical Tags

Common Scenarios
  • HTTP vs HTTPS versions
  • WWW vs non-WWW
  • Trailing slash variations
  • URL parameters (sorting, tracking)
  • Print-friendly page versions
  • Mobile URLs (m.domain.com)
E-commerce Examples
  • Product in multiple categories
  • Color/size variations with same content
  • Filtered and sorted product listings
  • Session IDs in URLs
  • Affiliate tracking parameters

Duplicate Content Examples

All these URLs might show the same content:

https://example.com/shoes/ https://example.com/shoes https://example.com/shoes/?color=red https://example.com/shoes/?utm_source=newsletter http://example.com/shoes/ http://www.example.com/shoes/
Without canonicalization, search engines may index the wrong version or dilute ranking signals across all URLs.

Canonical Tag Best Practices

Do Don't
Use absolute URLs Use relative URLs
Self-reference canonical tags on all pages Leave pages without canonical tags
Point to indexable pages Point to noindexed or blocked pages
Use one canonical tag per page Include multiple canonical tags
Match canonical with hreflang tags Create conflicting signals

Canonical vs Redirect: When to Use Which

Use Canonical When
  • Users need to access both URLs
  • URL parameters are needed for functionality
  • Content is very similar but not identical
  • You want to preserve both URLs
Use 301 Redirect When
  • URL has permanently moved
  • Old URL serves no purpose
  • Consolidating domains
  • Pages have been merged

Common Canonical Mistakes

  • Canonicalizing to a different page - Only use when content is truly duplicate or very similar
  • Canonical chains - Page A → Page B → Page C creates confusion
  • Conflicting signals - Canonical says X but sitemap/internal links say Y
  • Paginated canonical errors - Each page in a series should self-canonicalize
  • Case sensitivity issues - URLs are case-sensitive; be consistent

Checking Canonical Implementation

  1. View page source and look for the canonical tag in the &lt;head&gt;
  2. Use browser developer tools (Elements tab)
  3. Check Google Search Console for canonical issues
  4. Use SEO audit tools to find conflicting canonicals

External Resources