★ 5.0 on Google · No long contracts · You own every asset
Rathly

What is a canonical tag, and when should you use it?

Short answer

A canonical tag is a line of code that names the main URL of a page. You need it when several URLs show the same content. Google treats it as a strong signal, not a command. It works with redirects and consistent internal links to keep ranking signals on one URL.

In this answer
  1. 01What the tag looks like and does
  2. 02When you need one
  3. 03Canonical tag or redirect?
  4. 04Mistakes that confuse Google

What the tag looks like and does

The tag sits in the page head as a link element with rel="canonical" and the preferred URL. Google groups duplicate pages into a cluster and shows one of them, the canonical. Your tag tells Google which one you prefer.

Google lists three ways to state a preference, in order of strength. Redirects and canonical tags are strong signals. Listing a URL in your sitemap is a weak one. Google weighs all of them and can still choose a different URL when the signals conflict.

When you need one

  • The same page loads with tracking parameters like ?utm_source=
  • The page works with and without a trailing slash
  • Both HTTP and HTTPS or www and non-www versions load
  • A product or service appears under two category paths
  • A print version or filtered view copies the page

Every indexable page should also carry a self-referencing canonical that points to its own clean URL. It costs nothing and removes doubt.

Canonical tag or redirect?

Which one to use
Canonical tag
  • Both URLs need to keep working
  • Visitors may land on either version
  • Tracking or filter URLs stay live
  • A hint that Google can overrule
301 redirect
  • The old URL should stop loading
  • Visitors should end on the new page
  • You merged or moved the page
  • The strongest signal you can send

Mistakes that confuse Google

Bad example. Every page on a site carries a canonical pointing to the homepage, left behind by a theme setting. Google ignores the conflicting tags or drops pages from results.

Other common errors are canonicals that point to redirected or noindexed URLs, and canonicals that disagree with your internal links. Keep the tag, the sitemap and your links pointing at the same URL.

Check which canonical Google chose with the URL Inspection tool in Search Console. If Google picked a different one, the Page indexing report says so. Read more on duplicate content, or let our technical SEO team clean up your URLs.

Keep reading

Related answers

All SEO questions →

Your agency isn't delivering? Talk to us.

  • ✓ You talk to the people who do the work
  • ✓ We handle 95% of requests the same or next day
  • ✓ You own every account, site and listing
Talk to usSTEP 1 OF 2
What isn't working?
No contract. Cloudflare Turnstile blocks spam.
Call usTalk to us →