We use cookies to keep this site working and, with your permission, to remember your preferences, understand site traffic and support advertising. You can change your choice at any time. Cookie Policy

SEO Tool Orbit
Technical SEO

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

Illustration of four duplicate URL bars converging into one highlighted preferred URL with a check mark
Many addresses, one preferred URL. · Original illustration by SEO Tool Orbit

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

SourceExampleBest fix
Protocolhttp:// and https://301 redirect to HTTPS
Hostwww and non-www301 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=priceCanonical to the unfiltered page when the content is essentially the same
Printer or AMP versions/print/shoesCanonical to the main page
Syndicated copiesYour article on a partner siteAsk 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 tag301/308 redirect
Visitor seesThe duplicate pageThe preferred page
Search enginesTreat it as a strong hintTreat it as a strong signal
Use whenThe 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

  1. View the source of key templates and confirm exactly one canonical, absolute, in the head.
  2. Check the target: the canonical URL should return 200 — trace it with the Redirect Checker to be sure it doesn't redirect.
  3. Check headers for files: Get HTTP Headers shows a canonical sent in the Link header.
  4. Crawl the site: an SEO Audit reports missing, broken and conflicting canonicals across all pages.
  5. 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.

Illustration of a structured hierarchy of URL cards branching from a single sitemap root

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

Illustration of a crawler choosing between an open route marked with a check and a blocked route marked with a red barrier

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