Spider SEO Auditor
Technical SEO

What is a canonical tag and when should you use one?

What is a canonical tag and when should you use one?

A canonical tag is a line in a page's <head> that tells search engines which URL is the main version of that content. Use it whenever the same or very similar content is reachable at more than one address, so Google combines the signals into one URL instead of splitting them across duplicates.

What does a canonical tag look like?

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

Use the full absolute URL, including https:// and the domain.

When do you need one?

Duplicate URLs appear on almost every site without anyone meaning to create them:

  • Tracking parameters: /shoes?utm_source=newsletter
  • Sorting and filtering: /shoes?sort=price
  • http and https, or www and non-www versions
  • The same product in several categories
  • Printer-friendly or AMP versions

Give every indexable page a self-referencing canonical, pointing to its own clean URL. Then any duplicate version automatically points back to the main one.

Duplicate URLs pointing to one canonical URL
Every duplicate version points to the one main URL, so Google combines their signals there.

Is a canonical tag a command?

No. Google treats it as a strong hint, not a directive. It may choose a different URL if your other signals disagree, for example if internal links, the sitemap and redirects all point somewhere else. Keep them consistent. You can see which URL Google chose with the URL Inspection tool in Search Console.

What are the most common canonical mistakes?

MistakeWhat happens
Canonical points to a page that returns 404 or redirectsGoogle ignores it or drops the page
Every page canonicalises to the home pageGoogle may ignore the tags, or treat the pages as duplicates
Paginated pages all point to page 1Content on later pages may not be indexed
Two different canonicals on one pageGoogle ignores both
Canonical on a page that is also noindexConflicting signals

Canonical, redirect or noindex?

  • Use a 301 redirect when the old URL should no longer be visited at all.
  • Use a canonical when both URLs need to keep working for visitors.
  • Use noindex when a page should not appear in search, and has no main version elsewhere.

Google covers this in How to specify a canonical URL.

Check this on your own site

Spider's free check tests this and about 100 other things on any page, and links each problem to a guide like this one.