Technical SEO

What is a canonical tag?

Short answer

A canonical tag (rel="canonical") tells search engines which URL is the main version of a page when similar or duplicate versions exist. It helps consolidate ranking signals onto one URL.

Canonical tag, defined

A canonical tag is a line of HTML in a page's head that tells search engines which URL is the main version of that content. It looks like a link element with rel="canonical" pointing to the preferred URL.

When several URLs show the same or very similar content, the canonical tag helps Google choose one to index and rank, and consolidate signals like links onto it.

Google, Bing, Yahoo and Yandex introduced support for it together in 2009, and it's now one of the most widely used technical SEO tools.

Why duplicate URLs happen

Most sites create duplicates without anyone meaning to. Common causes:

  • Tracking parameters: ?utm_source=linkedin creates a new URL for the same page.
  • Sorting and filtering: ?sort=price, ?color=blue.
  • Trailing slashes: /pricing and /pricing/.
  • Protocol and domain variations: http, https, www and non-www.
  • Session IDs in URLs.
  • Printer-friendly or AMP versions.
  • The same product or article reachable from several categories.
  • Content syndicated to other sites.

To a search engine, each of these is a separate URL. Without guidance, it has to guess which one to show, and links and signals get split across versions.

How Google treats canonical tags

A canonical tag is a strong hint, not a command. Google considers it alongside other signals: redirects, internal links, which URL appears in your sitemap, HTTPS, and how similar the pages really are. If the signals conflict, Google may pick a different canonical than the one you declared.

You can see what Google chose in Google Search Console. The URL Inspection tool shows the "user-declared canonical" and the "Google-selected canonical". When they differ, something in your signals is inconsistent.

Self-referencing canonicals

A self-referencing canonical is a page that points its canonical tag at its own URL. It's considered best practice for every indexable page, because it protects against parameter variations created by links and tracking. Most modern CMSs add one automatically.

Canonical tag best practices

  1. Use absolute URLs, including https and the correct domain.
  2. Put one canonical per page, in the head. Multiple canonicals are usually ignored.
  3. Point to an indexable page that returns a 200 status, isn't noindexed and isn't redirected.
  4. Keep signals consistent. Link internally to the canonical version, and list only canonicals in the sitemap.
  5. Canonicalize only true duplicates or near duplicates. Pointing different pages at one URL tends to be ignored.
  6. Make sure it's in the raw HTML where possible, not only added by JavaScript.

Canonical vs redirect vs noindex

These are often confused. Each solves a different problem:

  • 301 redirect: the old URL shouldn't be visited at all. Users and bots are sent to the new one. Use it when pages move or merge.
  • Canonical tag: both URLs should stay accessible to users, but only one should be indexed. Use it for parameters, filters and syndicated copies.
  • Noindex: the page shouldn't appear in search at all, and there's no main version to consolidate into. Use it for thin utility pages.

Don't combine noindex and a canonical pointing elsewhere on the same page. They send contradictory messages.

Common canonical mistakes

  • Every page canonicalized to the homepage, often from a template bug. This can remove most of a site from Google.
  • Paginated pages (page 2, 3, 4) canonicalized to page 1, which hides the items listed on later pages.
  • Canonicals pointing to redirected or 404 URLs.
  • Canonical tags pointing to http after an https migration.
  • Staging domains in canonical tags after a launch.
  • Canonical in the HTML disagreeing with the one sent in an HTTP header.

These are among the most damaging and least visible technical issues, which is why canonical checks are part of every SEO audit.

Canonicals and syndication

If you republish your articles on Medium, LinkedIn or a partner site, ask them to add a canonical tag pointing to your original.

Google says canonical tags across domains are supported but not guaranteed to be respected for syndicated content, and it now recommends that partners use noindex on syndicated copies if you want to be sure the original ranks.

Canonicals on large and programmatic sites

Sites with faceted navigation or thousands of programmatic pages rely heavily on canonical tags to stop near-duplicate variations from flooding the index. The rule I follow: only let a variation be indexed if it targets a distinct search with real demand. Everything else canonicalizes to the main page, or isn't linked at all.

How to check your canonicals

  1. Crawl your site and export each URL with its canonical.
  2. Flag canonicals pointing to non-200, noindexed or non-HTTPS URLs.
  3. Flag pages with no canonical or more than one.
  4. Spot-check important pages in URL Inspection to compare declared and selected canonicals.
  5. Review Search Console's "Duplicate, Google chose different canonical than user" report.

Bottom line

Canonical tags tell search engines which version of a page is the real one. Set a self-referencing canonical on every indexable page, use them to consolidate genuine duplicates, and keep every other signal consistent with them. If you're unsure whether yours are working, it's a quick win in a technical SEO review.

Answered by Federico Martinez, SEO & AI Search Strategist · 4 min read. See all SEO questions

Want this sorted for your site?

Tell me what you're working on and I'll suggest a plan.

Federico Martinez

Related questions