What a canonical URL is
A canonical URL is the single "official" version of a page when the same content can be reached from multiple URLs. It is expressed as:
<link rel="canonical" href="https://example.com/pricing" />
inside the <head> of the page. Search engines consolidate ranking signals (backlinks, click data, indexation) onto that URL and treat the rest as duplicates.
Paste any URL. We normalize it (HTTPS, host casing, tracking params, sorting), and emit the canonical tag you can paste directly.
Why you need canonicals — even on unique pages
Even if you think every page has a single URL, in reality:
- Marketing appends
?utm_source=…and creates a new URL for every campaign. - Analytics scripts add
?fbclid=…or?gclid=…on click. - CDNs and A/B testing tools inject query params.
- Servers respond to both
example.com/pageandexample.com/page/. - HTTPS migrations leave
http://versions crawlable.
Every variant risks a small share of your ranking signals. A self-referencing canonical fuses them back together.
The seven rules Meta Tag Studio applies
| Rule | Effect |
|---|---|
| Force HTTPS | Upgrades http:// to https://. |
Strip www. |
Removes www. from the host. Turn on only if your site does not use it. |
| Strip trailing slash | Removes trailing / (keeps root /). Match your site's actual pattern. |
| Strip all query params | Aggressive. Use for pages that never take real params. |
| Strip fragment | Removes #section. Almost always safe. |
| Lowercase host | Example.COM → example.com. Always safe. |
| Sort remaining params | Deterministic ordering avoids duplicates like ?a=1&b=2 vs ?b=2&a=1. |
Params to always drop
Unless a page genuinely reads them, drop:
utm_source, utm_medium, utm_campaign, utm_term, utm_content,
gclid, fbclid, msclkid, twclid, ref, mc_cid, mc_eid, ttclid
They are attribution parameters — they never point at different content.
Common mistakes
- Canonical → different content. If page A's canonical is B, they must be genuinely the same content. Otherwise Google ignores the tag.
- Relative canonicals. Always absolute:
https://example.com/pricing, not/pricing. - Multiple canonicals per page. Only the first is honored — remove duplicates.
- Canonical pointing to a noindex page. Google will treat both as noindex.
- Trailing-slash mismatch. If your site canonicalizes to
example.com/page/, do not emitexample.com/page.
After you copy the tag
- Paste it inside the
<head>of the page. - In Next.js / Astro / SvelteKit, set it via the built-in
metadataor<svelte:head>. - Verify with the URL Inspection Tool — the "User-declared canonical" should match.
Even on the URL you consider the canonical, add a canonical tag pointing at itself. It signals intent, guards against future URL variants, and costs nothing.
FAQ
Does Google always honor the canonical? It is a strong hint. Google may still pick a different URL if signals conflict — but the great majority of the time, a clean canonical is followed.
Should the canonical include the trailing slash? Match your site's real routing. Pick one and be consistent.
Do canonicals help for cross-domain duplicates? Yes — a canonical pointing to a URL on a different domain is respected.