DevKit Tools

Canonical Tags: Fixing Duplicate Content Without Losing Rankings

3 min read4 October 2026By Muhammad Abdullah

To you, a page is one page. To a search engine, every different URL is a different page, and the same content often lives at many of them. When that happens, ranking signals get split between copies and the wrong one may show in results. A canonical tag tells search engines which URL is the real one.

Try it as you readCanonical and Pagination Tag GeneratorGenerate canonical, prev, next and robots tags so paginated and duplicated pages consolidate their ranking correctly.

How one page ends up with many URLs

text
http://example.com/shoes
https://example.com/shoes
https://www.example.com/shoes
https://example.com/shoes/
https://example.com/shoes?sort=price
https://example.com/shoes?utm_source=newsletter

These can all show the same page. Add sorting, filters, tracking parameters and printer versions, and a small shop can have thousands of URLs for a few hundred products.

The canonical tag

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

Placed in the head of every version, this says: whichever URL you reached this by, the main one is this. Search engines then gather the signals from all the copies onto that URL and show it in results.

  • Use the full absolute URL, with https and the domain.
  • Have exactly one canonical tag per page. With two different ones, search engines may ignore both.
  • Give every page a canonical that points to itself, even when it has no duplicates. It protects against copies created by parameters you did not plan for.

A hint, not a command

Google treats the canonical as a strong suggestion and weighs it against other signals: redirects, internal links, the sitemap and whether the pages are really the same. If they disagree, for example your links all point to one version while the canonical names another, Google may choose for itself. Make every signal point to the same URL.

Canonical or redirect?

If visitors never need the duplicate version, redirect it permanently. http to https and non-www to www are redirect jobs, not canonical jobs. Use a canonical when the duplicate must stay reachable, such as a sorted product list or a URL carrying tracking parameters.

Mistakes that cost traffic

  • Every page pointing its canonical at the home page, often from a template bug. Search engines are told only the home page matters.
  • Paginated pages all pointing to page one. Page two has different content, so it should be canonical to itself, or its products may never be found.
  • A canonical pointing to a URL that redirects, returns 404 or is set to noindex. Point it at a live page that returns 200.
  • Canonicals that differ from the internal links, such as linking to URLs with a trailing slash while the canonical has none.

Common questions

Does every page need a canonical tag?

It is good practice. A self-referencing canonical on every page protects against duplicates created by parameters and alternate URLs.

Will Google always follow my canonical tag?

No. It is a strong hint. If redirects, internal links or the sitemap point elsewhere, Google may choose a different URL.

Should I use a canonical or a 301 redirect?

Redirect when the duplicate does not need to exist for visitors. Use a canonical when both versions must stay reachable.

Tools from this guide

More guides