What a canonical URL is
A canonical URL is the one address you nominate as the master version of a page when the same — or nearly the same — content is reachable at more than one URL. You declare it with a <link rel="canonical"> element in the page’s <head> (or an equivalent HTTP header).
Its job is consolidation. When five URLs show the same content, their ranking signals — links, relevance, authority — would otherwise be split five ways. A canonical points them all at one URL, so those signals add up on the version you actually want to rank, and that’s the URL search engines index and show.
Why duplicates happen
Duplicate URLs appear far more easily than people expect. A crawler treats each of these as a separate URL, even when the page looks identical:
- Trailing slash — /about vs. /about/.
- www vs. non-www — www.example.com vs. example.com.
- http vs. https — the same path on two protocols.
- Query parameters — tracking (?utm_source=…), sorting or filtering (?sort=price), or session IDs.
- Casing — /Shoes vs. /shoes (paths are case-sensitive to a crawler).
- Pagination & facets — a product reachable through several category paths, or list pages with faceted parameters.
Self-referencing canonicals
The default every page should carry is a self-referencing canonical — a rel=canonical that points at the page’s own preferred URL. Far from redundant, it pins down the exact form you want indexed: the right protocol and host, correct casing, no trailing-slash ambiguity, and no tracking parameters. When someone links to your page with a ?utm_source tag, the self-referencing canonical tells Google the clean URL is the one that counts.
A copy-paste example
Add the canonical to the <head> of every variant of the page, pointing at the master URL as an absolute address:
<!-- In the <head> of every variant of the page -->
<link rel="canonical" href="https://example.com/shoes/running" />
<!-- Or, for non-HTML files (PDFs, etc.), as an HTTP header -->
Link: <https://example.com/shoes/running>; rel="canonical"Use one absolute URL, and make sure it matches the URL you list in your sitemap — a canonical and sitemap that disagree is a mixed signal.
Canonical vs. 301 redirect vs. noindex
These three tools all deal with duplicate or unwanted URLs, but they are not interchangeable — pick by what you need to happen to the URL:
| Tool | Use when | URL stays reachable? |
|---|---|---|
| 301 redirect | The URL should go away; everyone belongs on the new one (moved / merged). | No — it forwards |
| rel=canonical | Both URLs must stay reachable, but only one should be indexed (param variants, one product on two paths). | Yes |
| noindex | The page is useful to visitors but should be kept out of the index (thank-you, internal search). | Yes |
And remember canonical is a hint, not a directive. Google weighs it alongside redirects, internal links and sitemap inclusion, and can pick a different canonical than you declared — so keep every signal pointing at the same URL.
Common mistakes
- ✕Canonical to a redirected or noindexed URL. Pointing at a URL that then 301s elsewhere, or that carries noindex, sends the crawler in circles and undermines the signal. Canonicalize to a live, indexable 200.
- ✕Multiple canonicals on a page. Two conflicting rel=canonical tags (often one from the CMS and one from a plugin) make Google ignore both. Ship exactly one.
- ✕Relative or wrong-host URLs. Use an absolute URL with the correct protocol and host. A relative canonical, or one pointing at http:// or the www variant you don’t use, defeats the purpose.
- ✕Canonical / sitemap mismatch. Listing one URL in your sitemap while the page canonicalizes to another tells Google two different things. Keep them in lockstep.
- ✕All pages canonical to the home page. A common template bug — every page pointing its canonical at / — can deindex the whole site. Each page canonicalizes to itself unless it’s a true duplicate.
How to verify it
After shipping, view source (or the response headers) on a few pages to confirm the rel=canonical you intended — one tag, absolute URL, right host. Then use Google Search Console’s URL Inspection tool, which shows both your declared canonical and the Google-selected canonical, so you can spot where Google disagreed. A site crawl catches pages canonicalizing to redirected, noindexed or mismatched URLs at scale.
AvocadoScore checks that each page declares a canonical URL — as part of the readiness scorecard and the full audit.
Questions, answered
What is a canonical URL?+
A canonical URL is the single URL you designate as the master version of a page when the same or very similar content is reachable at more than one address. You declare it with a rel="canonical" link element (or an HTTP header). It tells search engines "of all the URLs showing this content, this is the one to index and rank" — so ranking signals consolidate onto one address instead of being split across duplicates.
Why does the same page end up on multiple URLs?+
More easily than most people expect. Trailing slash vs. none, www vs. non-www, http vs. https, uppercase vs. lowercase paths, tracking or sorting query parameters (?utm_source=…, ?sort=price), session IDs, and paginated or faceted variants can all serve identical or near-identical content at different URLs. Each is a separate URL to a crawler, and without a canonical they compete with each other.
Is rel=canonical a directive or a hint?+
A hint. Google treats rel="canonical" as a strong signal but not a command — it also weighs internal linking, redirects, sitemap inclusion, and which URL looks more authoritative, and it can choose a different canonical than the one you declared. Keep every signal pointing the same way (canonical, internal links, sitemap) so Google agrees with your choice.
Canonical, 301 redirect, or noindex — which do I use?+
Use a 301 redirect when a URL should no longer be reachable and everyone belongs on the new one (moved or merged pages). Use rel=canonical when both URLs must stay reachable but only one should be indexed (a product on two category paths, a print view, param variants). Use noindex when a page should be crawlable and usable by visitors but kept out of the index entirely (thank-you pages, internal search results). They solve different problems — do not stack them on the same URL.
What is a self-referencing canonical?+
It is a page whose rel=canonical points at its own URL. That is recommended, not redundant: it states the exact preferred form of the page (protocol, host, casing, no tracking params) and stops parameter or slash variants from being treated as separate. Most pages should carry a self-referencing canonical as the default.
How do I check which URL Google treats as canonical?+
Use the URL Inspection tool in Google Search Console — it reports both your declared canonical and the "Google-selected canonical", so you can see when Google disagreed with you. You can also view source (or the response headers) to confirm the rel=canonical you shipped, and crawl the site to catch pages pointing at redirected, noindexed, or mismatched URLs.
Are your canonicals pointing where you think?
AvocadoScore checks your canonical tags, sitemap, robots.txt and the rest of your AI readiness across your site, with a ranked fix list. Free, every fix unlocked.