What is a canonical tag?

A canonical tag (rel="canonical") is an HTML tag that tells search engines which URL is the main version of a page when several URLs show the same content.

Duplicates happen more often than you’d think: http and https versions, tracking parameters like ?utm_source=newsletter, sorted or filtered product lists, print versions. The canonical tag points all of them at one preferred URL. Here’s what it looks like:

<link rel="canonical" href="https://example.com/blog/canonical-tags/" />

That same line goes in the <head> of every duplicate version, such as https://example.com/blog/canonical-tags/?utm_source=newsletter, and on the preferred page itself. A tag that points to its own page is called a self-referencing canonical, and Google recommends adding one.

What is a canonical page?

The canonical page (or canonical URL) is the version Google picks as the most representative from a group of duplicate or near-duplicate pages. According to Google, it crawls that page most often, uses it as the main source for judging the content, and usually shows it in search results. The other versions are crawled less and mostly kept out of results.

Having some duplicate URLs is normal and isn’t a spam problem. The canonical tag just lets you vote on which one becomes the canonical page.

Does Google always follow it?

No. Google calls a canonical preference “a hint, not a rule.” It weighs rel="canonical" as a strong signal alongside others: a redirect is also a strong signal, a sitemap listing is a weak one, and Google prefers HTTPS over HTTP. Using two methods together, like a canonical tag plus a sitemap that lists the same URL, makes your preference more likely to stick. When signals conflict, or the pages aren’t really duplicates, Google may pick a different URL.

Search Console shows you when that happens. In the Page indexing report, “Duplicate, Google chose different canonical than user” means Google overrode your tag, and “Duplicate without user-selected canonical” means the page had no canonical and Google chose one for you. Our guide to fixing duplicate without user-selected canonical walks through the second one.

Why canonical tags matter

Google says you don’t strictly need them, because it will pick a canonical on its own. Setting one yourself helps when you care which URL wins:

  • You control which URL people see in search results, instead of a version with tracking parameters.
  • Signals like backlinks pointing at different versions get consolidated on one URL.
  • Your analytics and Search Console data for that content sit on one URL instead of several.
  • Googlebot spends less time recrawling duplicates and more on new or updated pages.

Common canonical tag mistakes

Most problems come from the tag pointing somewhere you didn’t intend, or from signals that disagree with each other. These are the ones Google’s documentation calls out:

  • Using a relative URL like /blog/canonical-tags/. Google supports it but recommends the full absolute URL, because relative paths can cause trouble later (for example, on a crawlable staging site).
  • Putting the tag in the <body>. Google only accepts it in the <head>.
  • Having two canonical tags with different URLs, often because a theme and an SEO plugin both add one. In that case, Google says it will likely ignore all of them.
  • Sending mixed signals, such as one URL in your sitemap and a different one in the canonical tag, or internal links that point to a duplicate instead of the canonical URL.
  • Canonicalizing a page that isn’t really a duplicate, such as a category page pointed at the article it currently features. If Google accepted that tag, the category page would drop out of search results.
  • Using noindex or robots.txt instead. Noindex removes the page from search entirely, and a robots.txt block doesn’t stop the URL from being indexed.

How to check a page’s canonical tag

View the page source and search for rel="canonical", or open the RightBlogger Chrome extension, which shows the canonical URL along with the title, meta description, and robots status. To see what Google actually chose, run the URL through the URL Inspection tool in Search Console and compare the user-declared canonical with the Google-selected canonical.

On WordPress you rarely need to add the tag by hand. Yoast SEO, for example, outputs a self-referencing canonical by default and lets you set a different canonical URL per post. It skips pages marked noindex.