Skip to main content
SerpGem
All SEO guides
Technical SEO

Canonical URLs: What They Are and How to Use Them

Canonical URLs solve one of the most pervasive technical SEO problems: duplicate content. When the same content exists at multiple URLs, search engines split their ranking signals across those URLs instead of consolidating them onto one. The canonical tag is the signal that tells Google which version you want ranked.

7 min read

What canonical URLs are

A canonical URL is the version of a URL that you designate as the definitive, preferred version of a page when multiple URLs can display the same or very similar content. The canonical is declared using the rel="canonical" HTML link element: <link rel="canonical" href="https://example.com/preferred-url/"> placed in the page's <head>.

The canonical tag is a hint to search engines, not a directive. Unlike a 301 redirect (which forces the browser and crawler to move from one URL to another), the canonical tag allows the page to remain accessible at multiple URLs while telling search engines which version to associate ranking signals with.

Self-referencing canonicals — where the canonical tag on a page points to itself — are best practice on all pages, even those with no duplicate risk. This explicitly tells Google that the URL it crawled is the canonical version, reducing ambiguity and preventing Google from making its own canonical selection that you might not agree with. Most well-configured CMS platforms add self-referencing canonicals automatically.

The canonical signal flows link equity and ranking authority. If PageA and PageB have identical content, and PageA has 50 backlinks while PageB has 30, both sets of links contribute to the canonical's ranking signals. Setting PageA as canonical consolidates all 80 links' worth of authority onto PageA, rather than splitting it 50/30.

Why duplicate content is a problem

Duplicate content does not result in a penalty in the traditional sense — Google does not punish you for having duplicates. What it does is divide. When the same content exists at multiple URLs, Google must choose which version to index and rank. Its choice may not align with yours. The version Google prefers might be a session-ID URL, a print version, or a www vs non-www variant — versions that look worse in the SERP, carry less authority, or are harder to share.

More damaging is the dilution of link equity. When external sites link to your content, they inevitably link to different URL variants. Bloggers copy the URL from their browser bar, which might include tracking parameters. Press mentions link to an HTTP version when your site has migrated to HTTPS. Article aggregators link to a mobile subdomain. Each variant accumulates backlinks, but none accumulates enough to effectively compete. The canonical tag consolidates these fragmented signals.

The crawl budget impact is real for large sites. When Google's crawler visits your site, it has a finite amount of resources allocated to crawling it — the crawl budget. Crawling hundreds or thousands of duplicate URLs wastes that budget on content that adds no new value. On an e-commerce site with 50,000 products and multiple filter parameters per product, duplicate URLs can multiply the crawlable URL space by 10x, leaving genuinely unique pages crawled infrequently or not at all.

How rel=canonical works

The rel="canonical" tag is placed in the <head> section of the duplicate page, pointing to the URL you want Google to treat as the canonical. The canonical URL must be an absolute URL, not a relative path: <link rel="canonical" href="https://example.com/target-page/"> not <link rel="canonical" href="/target-page/">.

When Google crawls a page with a canonical tag, it typically respects it within 1 to 7 days of crawling, redirecting its indexing signals (ranking authority, featured snippet eligibility) to the canonical URL. The original (non-canonical) URL may remain accessible but will not appear in search results for that content.

Canonical can also be declared in the HTTP response headers, as a Link header: Link: <https://example.com/canonical-url/>; rel="canonical". This method is useful for documents like PDFs that cannot contain HTML meta tags.

For Google to fully respect a canonical declaration, the two URLs should have nearly identical content. If the pages differ significantly — for example, if one is a filtered version of a product category with meaningfully different products — Google may ignore the canonical and make its own indexing decision. The canonical tag is most reliable when the content is truly equivalent.

When to use canonical vs redirect

The choice between a canonical tag and a 301 redirect depends on whether you need the duplicate URL to remain accessible.

Use a 301 redirect when the duplicate URL serves no purpose for users and can be permanently retired. If you migrated from HTTP to HTTPS, the HTTP URL should 301 redirect to the HTTPS version — there is no legitimate reason for both to be accessible. If you consolidated two blog posts into one, the old URL should 301 redirect to the new one.

Use a canonical tag when the duplicate URL needs to remain accessible for legitimate reasons. E-commerce filter pages (/?color=blue&size=M) are a classic example — users and third-party systems may rely on these URLs functioning, but you do not want each filter combination indexed as a separate page. Setting the canonical to the base category page tells Google which version to index without breaking the filter URL.

Print-friendly versions of articles, session-ID variants, and AMP pages are other canonical use cases. All remain accessible at their URLs but point canonical authority to the standard version.

The SEO effect differs: a 301 redirect passes link equity and eventually removes the source URL from the index. A canonical tag consolidates link equity but does not remove the source URL — it just influences which version Google chooses to rank. For maximum SEO signal consolidation, redirects are more definitive. For operational flexibility, canonicals are more practical.

Cross-domain canonicals

Cross-domain canonicals allow a page on one domain to declare that a page on a different domain is the canonical version. This is most commonly used in two scenarios: when syndicating content across multiple owned domains and when using a staging or development domain alongside a production domain.

Example of syndication: you publish original articles on yourblog.com and then republish them on a partner site (e.g., Medium or a guest post host). You want the link equity and indexing priority to accrue to your domain. The republished version on the partner site should include <link rel="canonical" href="https://yourblog.com/original-article/">, pointing authority back to your site.

Google supports cross-domain canonicals, but with important caveats. The target domain must accept the canonical — Google verifies that the canonical destination does not itself declare a different canonical or a noindex. And the content must be substantially equivalent; cross-domain canonicals pointing to a different article are ignored.

For development and staging environments, set a canonical on the staging domain pointing to production: <link rel="canonical" href="https://production.com/page/"> on every staging page. This prevents staging content from being indexed if Googlebot discovers the staging URL via a link.

Cross-domain canonicals are not widely used but are an important tool for publishers who manage content distribution across multiple domains or properties.

Common canonical mistakes

Pointing the canonical at a noindexed page creates an irresolvable conflict. If page A canonicalizes to page B, but page B has a noindex directive, Google will suppress page A from the index (following the canonical) while also suppressing page B (following the noindex). Both pages disappear from search results.

Setting canonicals to redirect destinations instead of the final URL adds confusion. If your canonical points to a URL that itself 301 redirects to another URL, Google must follow the redirect chain to find the actual canonical. Set canonicals directly to the final URL.

Using relative URLs in the canonical href is fragile. If your canonical is <link rel="canonical" href="/page/"> and the page is accessed via a subdomain (m.example.com), the relative path resolves to m.example.com/page/ rather than www.example.com/page/ — pointing the canonical to a different URL than intended. Always use absolute URLs.

Forgetting to update canonical tags after a URL restructure leaves old canonicals pointing to non-existent or redirected URLs. Maintain canonical URLs as part of any CMS migration or URL restructure process.

Setting every page to the same canonical (often accidentally via a CMS template bug) consolidates all pages' authority onto a single URL, making all other pages invisible to search. Audit canonicals across page types after any template-level change.

SerpGem's Canonical Tag Generator and Meta Tag Analyzer help you build and audit canonical implementations before they cause indexing problems.

Frequently asked questions

Does the canonical tag guarantee which URL Google indexes?
No. Canonical is a hint, not a directive. Google respects it in the vast majority of cases, but if the canonical destination has problems (noindex, redirects, very different content), Google may override it with its own canonical selection. A 301 redirect is the only mechanism that forces a canonical outcome.
Should every page on my site have a canonical tag?
Yes. Self-referencing canonicals (where the tag points to the page itself) are best practice on all pages. They prevent Google from making undesirable canonical selections and add clarity to your site's structure. Most modern CMS platforms add them automatically.
Does a canonical tag pass PageRank (link equity)?
Yes. When external pages link to a non-canonical URL, the canonical tag tells Google to associate that link's authority with the canonical URL instead. This is one of the primary SEO benefits of canonical tags — consolidating fragmented link equity onto the preferred page.
Can I use a canonical tag to solve all duplicate content problems?
Canonical tags work well for URL-based duplication (parameters, trailing slashes, protocol variants) and content syndication. They are less effective for pages with significantly different content, for URLs where the duplication is structural (many pages with the same boilerplate), or where the duplicate is on a domain you do not control. In those cases, 301 redirects, noindex tags, or content differentiation may be more appropriate.