How to Use Canonical Tags to Prevent Duplicate URL Problems
The same page often lives at several addresses. Canonical tags tell search engines which one to index — when they agree with your other signals.
By SEO Tool OrbitUpdated October 30, 20265 min read

To a person, example.com/shoes, www.example.com/shoes/ and example.com/shoes?utm_source=newsletter are the same page. To a search engine, they are three URLs that might be three pages. Left alone, it has to guess which one to index, may split signals between them, and can waste crawling on copies.
In short: give every indexable page a rel="canonical" pointing to its preferred URL — usually itself — as an absolute URL. Redirect true duplicates (HTTP to HTTPS, www to non-www) rather than relying on canonicals. Make sure the canonical URL returns 200, is indexable, and is the one used in your sitemap and internal links. A canonical is a strong hint, not a command.
What a canonical URL is
The canonical URL is the version of a page you want search engines to treat as the main one. You declare it in the page's <head>:
<link rel="canonical" href="https://example.com/shoes/running">
Or, for files without HTML such as PDFs, in an HTTP header (our PDF SEO guide covers this case):
Link: <https://example.com/guides/sizing.pdf>; rel="canonical"
Search engines then consolidate signals — links, relevance — onto the canonical and usually show only it in results.
Self-referencing canonicals
Every indexable page should usually point its canonical at itself. That sounds redundant, but it protects the page against all the variants you don't control: someone links to it with a tracking parameter, a different letter case, or an extra slash, and the canonical still names the clean version. Most CMSs and SEO plugins add self-referencing canonicals automatically; check that yours does, and that the URL it outputs is exactly right.
Where duplicate URLs come from
| Source | Example | Best fix |
|---|---|---|
| Protocol | http:// and https:// | 301 redirect to HTTPS |
| Host | www and non-www | 301 redirect to your chosen host |
| Trailing slash and case | /Shoes and /shoes/ | Redirect to one form; canonical as backup |
| Tracking parameters | ?utm_source=… | Self-referencing canonical on the clean URL |
| Sorting and filtering | ?sort=price | Canonical to the unfiltered page when the content is essentially the same |
| Printer or AMP versions | /print/shoes | Canonical to the main page |
| Syndicated copies | Your article on a partner site | Ask the partner to add a cross-domain canonical to your original |
HTTP versus HTTPS and www versus non-www
These variants are entire duplicate copies of your site. Fix them at the server with permanent redirects so every request ends up on one protocol and one host — then use canonicals that name that same form. A canonical alone leaves both versions accessible and relies on search engines honouring the hint. Our URLs and redirects guide covers how to set these redirects up and test them.
Canonical tags versus redirects
| Canonical tag | 301/308 redirect | |
|---|---|---|
| Visitor sees | The duplicate page | The preferred page |
| Search engines | Treat it as a strong hint | Treat it as a strong signal |
| Use when | The duplicate must stay accessible (parameters, filters, print views) | The duplicate has no reason to exist (old URLs, protocol and host variants) |
Pagination and filtered pages
Page 2 of a category isn't a duplicate of page 1 — it lists different items — so give each page in a paginated series its own self-referencing canonical rather than pointing them all at page 1. For filters, canonicalise to the unfiltered page only when the filtered view adds nothing distinct; a filter that creates a genuinely useful page (for example "running shoes for women") may deserve to be indexable on its own.
A worked example: one product, many URLs
Suppose a shop's product page is reachable at all of these:
http://shop.example.com/shoes/trail-runner
https://shop.example.com/shoes/trail-runner/
https://shop.example.com/shoes/trail-runner?colour=blue
https://shop.example.com/sale/trail-runner
https://shop.example.com/shoes/trail-runner?utm_source=newsletter
A sound set-up redirects the HTTP and trailing-slash variants to https://shop.example.com/shoes/trail-runner. The colour and campaign variants keep working but carry a canonical pointing at that URL, as does the /sale/ path, unless the sale page is genuinely different. The sitemap and every internal link use the one canonical URL.
Canonicals and hreflang
For translated pages, each language version should canonicalise to itself, not to one "master" language, and link to its alternates with hreflang. Canonicalising every language to the English page tells search engines the translations are duplicates.
Common canonical mistakes
- Pointing to a URL that redirects, returns 404 or is noindexed. The signals contradict each other, and search engines will likely ignore the canonical.
- Relative URLs such as
href="/shoes". They work in theory but are easy to break; use absolute URLs. - Several canonical tags on one page, often one from the theme and one from a plugin. Search engines may ignore all of them.
- Every page canonicalised to the homepage — a template bug that tells search engines most of your site is a copy.
- A canonical in the
<body>instead of the<head>; it's ignored there. - Mixed signals: sitemaps and internal links using one URL while the canonical names another.
- Blocking the duplicate in robots.txt, so the crawler never sees its canonical — the robots guide explains why that backfires.
Keep every signal consistent
Search engines choose a canonical from several signals: redirects, canonical tags, sitemap inclusion, internal links and HTTPS. When they all point at the same URL, your choice is almost always respected. When they disagree, search engines pick their own. So after setting canonicals, check that your XML sitemap lists only canonical URLs and that internal links use them too.
How to validate canonical implementation
- View the source of key templates and confirm exactly one canonical, absolute, in the head.
- Check the target: the canonical URL should return 200 — trace it with the Redirect Checker to be sure it doesn't redirect.
- Check headers for files: Get HTTP Headers shows a canonical sent in the Link header.
- Crawl the site: an SEO Audit reports missing, broken and conflicting canonicals across all pages.
- Compare with Google's choice: Search Console's URL Inspection shows the canonical you declared and the one Google selected. A mismatch means your signals disagree.
Canonical checks belong in every technical SEO audit, especially after a template change.
Frequently asked questions
Is a canonical tag a directive?
No. It's a strong hint. Search engines usually follow it when other signals agree, but they can choose a different URL.
Can I canonicalise to a page on another domain?
Yes — cross-domain canonicals are supported, which is useful for syndicated content. The pages should have substantially the same content.
Should noindexed pages have a canonical?
Avoid combining noindex with a canonical pointing elsewhere; the two send different messages. Choose one: noindex the page, or canonicalise it.
Next step
Pick your three most important templates, view their source, and check that each outputs one absolute, self-referencing canonical that returns 200. Then run an SEO Audit to find the exceptions across the rest of the site.
- #Technical SEO
- #Crawling & Indexing
- #Redirects
Related reading

Technical SEO
How to Create SEO-Friendly URLs and Website Redirects
Good URLs are readable and stable; good redirects keep old links working when URLs must change. Here's how to get both right, including during migrations.
5 min read

Technical SEO
How to Perform a Technical SEO Audit Step by Step
A technical audit answers one question: can search engines reach, understand and index your important pages? Here is the order to check things in, and what to fix first.
6 min read

Technical SEO
How to Create an XML Sitemap for a Website
An XML sitemap tells search engines which pages you want found. Here's what to include, how to structure it for large sites, and how to keep it accurate.
5 min read

Technical SEO
Robots.txt vs Meta Robots vs X-Robots-Tag
Robots.txt controls crawling; meta robots and X-Robots-Tag control indexing. Mixing them up is one of the most common ways sites accidentally disappear from search.
5 min read