GlossaryCanonical URL

Canonical URL

The 'official' URL for a page — what search engines should treat as the version of record.

A canonical URL is the version of a page you've designated as the "official" one — the address you want search engines (and any tool measuring traffic) to credit when the same content can be reached through several different URLs. Same content, several entrances, one address that gets the credit.

For example, a product page might be reachable at example.com/shop/widget, example.com/widget?ref=newsletter, and m.example.com/widget — three URLs, same product. Without a canonical URL declared, search engines might split ranking signals across all three. With one declared, the signals consolidate on the version you've named as canonical.

What canonicalization actually does

Same page, several entrances

Canonical example.com/widgetYour declared canonical version
→ credits canonical example.com/widget?utm_source=newsletterTracking parameter
→ credits canonical example.com/widget?ref=partner-siteReferral parameter
→ credits canonical m.example.com/widgetMobile subdomain
→ credits canonical EXAMPLE.com/WidgetDifferent casing

Without rel="canonical"

Search engines see five separate pages with the same content. Ranking signals get split across all of them — none ranks as well as a single consolidated page would.

With rel="canonical"

Search engines credit all five URLs to the canonical version. Signals consolidate, the canonical URL ranks; the others quietly fall in line behind it.

The canonical URL doesn't change what visitors see — they can still reach the page through any of the variants. It only changes how search engines credit the page: instead of treating the variants as separate competing pages, they treat them as one.

How it's declared

The most common way to declare a canonical URL is a <link> tag in the HTML <head>:

<link rel="canonical" href="https://example.com/shop/widget" />

That tag tells search engines: "This is the official URL for this page. Credit any matching content here."

A canonical URL can also be communicated via the Link: HTTP header (useful for non-HTML files like PDFs) or, in many content management systems, via a setting in the post editor — but the <link> tag is by far the most common.

Try it

Paste a URL and we'll generate the canonical tag for it — normalising protocol, casing, tracking parameters, and fragments along the way.

Try it — canonical tag generator

Runs in your browser. Nothing is sent.

Recommended canonical tag

<link rel="canonical" href="https://example.com/Widget" />

Adjustments made to your URL

  • Switched http:// to https://.
  • Dropped tracking parameters: utm_source, ref.
  • Dropped fragment (#section). Canonicals don't include fragments.

This is a starting point, not a guarantee. Your canonical should match the version of the page you actually want indexed — sometimes that's not the most "normalised" URL.

When canonicalization matters

Three situations where you'll want to declare a canonical URL:

  • Same content, multiple URLs. Tracking parameters, session IDs, sort and filter variants, mobile vs desktop URLs, http vs https, www vs non-www — all reach the same page but produce many distinct URLs in search engines' eyes.
  • Syndicated content. When you republish an article on Medium, LinkedIn, or a partner site, pointing the canonical URL back to the original avoids the syndicated copy outranking yours.
  • Pagination. A blog index split across several pages (/?page=1, /?page=2, …) usually points its canonical at the first page, signalling that the URLs are the "same" content split for ergonomics.

Canonical URL vs 301 redirect

These solve overlapping problems but in different ways:

  • A 301 redirect moves visitors from one URL to another. The old URL becomes unreachable.
  • A canonical URL lets several URLs coexist — visitors can still reach all of them — while telling search engines which one to credit.

Pick a 301 when the duplicate URL has no reason to exist anymore. Pick a canonical when the URLs are useful for visitors but should be treated as one for ranking.

Common mistakes

  • Pointing the canonical at the wrong URL. A page's canonical should match its own content. Pointing two different pages at the same canonical tells search engines they're duplicates — and one will get dropped from the index.
  • Relative URLs. <link rel="canonical" href="/widget" /> works in most clients but is fragile across protocols and subdomains. Always use the full absolute URL: https://example.com/widget.
  • Mismatched protocols or hosts. If your canonical says https://example.com/widget but the page is reached via http://www.example.com/widget, you've created exactly the duplicate-URL situation canonicalization is supposed to fix. Pick one canonical and redirect or canonicalize the variants to it.
  • Trailing-slash inconsistency. /widget and /widget/ are different URLs to search engines. Pick one and make sure your canonicals — and your redirects — agree.
  • Self-referencing on every page is fine. A page declaring its own URL as canonical (with no actual duplicates) is harmless. It just makes the canonical explicit.
TermsPrivacyCookies
© 2026 Nimble Links Inc.