Technical SEOIntermediate

Canonical URL

A canonical URL is the version of a page search engines treat as the main one when several URLs show the same or very similar content.

Also called: rel=canonical, Canonical tag

When the same content is reachable at more than one URL, search engines pick one to index and show, called the canonical. Site owners can suggest which one they prefer with a rel="canonical" link tag, an HTTP header, redirects, sitemaps and consistent internal links. Google treats these as signals and makes the final choice itself, so the goal is to make every signal agree.

Why duplicates happen

Most duplication is accidental. Tracking parameters, sort and filter options, trailing slashes, uppercase letters, HTTP and HTTPS, www and non-www, print views, and syndicated copies all create alternate URLs for one page. On SaaS sites, docs versioning (/v2/ and /latest/), localized pages without real translation, and programmatic templates with near-identical content add more.

Duplicates are not a penalty issue. The cost is that signals such as links get split across versions, crawlers waste time on copies, and the URL Google shows may not be the one you want.

How to declare a canonical

The common method is a link element in the head of each duplicate (and, as a self-reference, on the canonical itself). Use an absolute URL. For non-HTML files such as PDFs, send the same information in an HTTP Link header.

<!-- In the <head> of https://www.example.com/pricing?utm_source=newsletter -->
<link rel="canonical" href="https://www.example.com/pricing" />

# HTTP header form, useful for PDFs
Link: <https://www.example.com/whitepaper.pdf>; rel="canonical"

Signals Google weighs

Google's documentation lists several canonicalization signals with different strengths. Redirects are a strong signal, rel="canonical" is a strong signal, and sitemap inclusion is a weak one. Google also considers whether a page is on HTTPS, internal and external linking, and other factors. When signals conflict, Google may pick a different URL than the one you declared.

Search Console's URL Inspection tool shows both the user-declared canonical and the Google-selected canonical, which is the fastest way to spot a disagreement.

Canonical versus noindex versus redirect

Use a redirect when the duplicate URL has no reason to exist for visitors. Use a canonical when visitors need both URLs (for example, a filtered view) but search should consolidate to one. Use noindex when the page should not appear in search at all and has no better version to point to. Avoid combining noindex with a canonical pointing elsewhere; they send mixed instructions.

Example

Versioned API docs

A fictional developer tool, Hookbase, publishes docs at /docs/v1/, /docs/v2/ and /docs/latest/, where latest mirrors v2. Google indexes a mix of all three, and searchers sometimes land on deprecated v1 pages.

The team makes /docs/latest/ redirect to /docs/v2/, adds self-referencing canonicals on v2, and adds a clear banner plus a link to the current version on v1 pages. Whether v1 pages should also be canonicalized or noindexed depends on whether users still need them, which is a product decision as much as an SEO one.

Common mistakes

Canonicalizing every page to the homepage

A template bug that sets the same canonical sitewide can push Google to ignore large parts of the site. Check canonicals after template changes.

Pointing canonicals at redirected or noindexed URLs

The canonical target should return 200, be indexable, and be the final URL.

Relying on canonical to fix big content differences

Canonicals are for duplicates and near-duplicates. If two pages are meaningfully different, Google may ignore the hint.

Questions

It is not required, but it is a cheap safeguard against parameter and tracking variants, and most SEO setups include one.

Yes. Cross-domain canonicals are supported, for example when content is syndicated to a partner site. Google still treats them as a hint.

Usually because other signals disagree: internal links point to another version, the sitemap lists a different URL, or the pages are not actually duplicates. URL Inspection shows which URL Google chose.

Know the terms. Now win the searches.

We find the searches your buyers make, then build, publish and improve the pages that win them.