By SitemapFixer Team
Updated April 2026

URL Canonicalization: Consolidate Duplicates and Protect Rankings

Find canonical conflicts in your sitemap freeAnalyze My Sitemap Free

What URL Canonicalization Is

Canonicalization is the process of selecting the preferred URL when multiple URLs serve identical or very similar content. Common examples: https://yoursite.com and https://www.yoursite.com, http://yoursite.com and https://yoursite.com, yoursite.com/page and yoursite.com/page/, yoursite.com/page?utm_source=newsletter and yoursite.com/page. When Google encounters multiple URLs with the same content, it picks one to index - called the canonical URL. Without explicit signals from you, Google may choose incorrectly.

Method 1: rel=canonical Link Tag

Add a link rel=canonical href=https://yoursite.com/preferred-url in the head section of every page. This is the primary canonicalization signal. Every page should have a canonical tag - either self-referencing (canonical points to itself) for non-duplicate pages, or pointing to the canonical version for duplicate pages. In Next.js: set alternates.canonical in the metadata object. In WordPress: Yoast and RankMath add canonical tags automatically.

Method 2: 301 Redirects

For pages that should not exist as separate URLs at all, use a 301 redirect to send users and search engines directly to the canonical URL. 301 redirects are stronger than canonical tags - they are instructions rather than hints. Use 301s for: consolidating www vs non-www, HTTP to HTTPS, trailing slash vs no trailing slash, and any permanently redundant URLs. A page receiving a 301 redirect passes nearly all its link equity to the destination.

Method 3: URL Parameters in Search Console

For URL parameters that do not change page content (tracking parameters, session IDs, sort orders), you can instruct Google to ignore them in Google Search Console under Legacy Tools and Reports then URL Parameters. This tells Google that yoursite.com/page?ref=email is the same as yoursite.com/page. This approach is useful for parameters you cannot easily canonical-tag or redirect.

Canonical Tags and Sitemaps Working Together

Your sitemap and canonical tags should always agree. Only include canonical URLs in your sitemap - never include URLs that have a canonical tag pointing somewhere else. If yoursite.com/page?color=red has a canonical pointing to yoursite.com/page, only include yoursite.com/page in your sitemap. Including both sends contradictory signals. SitemapFixer analyzes your sitemap for URLs that conflict with canonical tags found on the actual pages.

Common Canonicalization Mistakes

Canonicalizing to a noindexed page: a canonical pointing to a page with noindex causes both pages to be excluded from the index. Canonicalizing to a 404: Google discovers the canonical destination returns an error and may ignore the canonical entirely. Cross-domain canonicalization without proper setup: canonicalizing to a different domain requires specific configuration and is handled differently by Google. Pagination canonicalization: do not canonical paginated pages (page/2, page/3) to page/1 - use self-referencing canonicals on paginated pages instead.

Check your sitemap for canonical conflicts
Free - detects duplicate URL patterns in 60 seconds
Analyze My Sitemap Free

Related Guides