SEO glossary

Canonical tag

Definition

A canonical tag is one line of HTML: <link rel="canonical" href="https://example.com/page" />. It sits in the head and tells Google which URL to index when several show the same content. It's a hint, not an order — Google overrides it whenever your other signals disagree with it.

Updated 26 July 2026 · Written by the Last Agency team · See what SEO actually costs

The short version

  • The tag belongs in <head>, uses an absolute URL, and there must be exactly one of them per page.
  • Every page should carry a self-referencing canonical pointing at itself. That's the default, not the exception.
  • A canonical is a hint. A 301 redirect is a rule. If you never want the old URL served again, redirect it.
  • Search Console's URL Inspection tool shows you the Google-selected canonical. That's the only opinion that counts.

The tag itself, and where it goes

Here is the whole thing: <link rel="canonical" href="https://example.com/products/brass-lamp" />.

Four rules govern it, and breaking any one of them makes it useless.

Most pages should point at themselves. A self-referencing canonical costs nothing, and it stops Google guessing when someone links to your page with ?fbclid= stapled on the end. Set it as the template default and override only where you mean to.

  • It goes in `<head>`. Anywhere else and it's ignored outright.
  • Use an absolute URL, with the protocol and host. /products/brass-lamp is not enough.
  • One per page. Two conflicting canonicals and Google discards both.
  • Match the URL you actually want — right protocol, right www setting, right trailing slash. A canonical pointing at a URL that 301s somewhere else is a wasted signal.

The three ways it breaks on real stores

We see the same three failures on Shopify and WooCommerce catalogues over and over. None of them throw an error. All of them quietly cost you indexed pages.

  1. Every page canonicalising to the homepage. Usually a theme setting or a plugin field somebody filled in once with the site URL. The effect is brutal: you're telling Google that 400 product pages are all duplicates of your homepage, so none of them get indexed. If your product count in Search Console collapsed after a theme update, check this first.
  2. The canonical injected by JavaScript into the body. A tag manager or a client-side script writes it after the page loads, and it lands outside <head>. It looks right in DevTools. It does nothing. View source — not Inspect Element — and check where it actually sits in the raw HTML.
  3. Canonical fighting a noindex. A page says "don't index me" and "the real version of me is over there" at the same time. Google's own guidance is not to combine the two, because they're contradictory instructions and you don't control which one wins. Pick one. If the page shouldn't be in the index, noindex it and remove the canonical to elsewhere; see canonical vs noindex for which to use when.

Canonical tag or 301 redirect?

These get confused constantly, and the difference is simple: a canonical keeps both URLs reachable and picks one for search. A redirect makes one URL unreachable.

Which one to reach for.
SituationUse
Product reachable through two category pathsCanonical — users need both paths to work
Tracking parameters on shared linksCanonical — you can't stop people adding them
Printer-friendly or AMP variantCanonical to the main version
Old URL after a rename or migration301 — nobody should land on the old one again
http and www duplicates301 at the server, then a self-referencing canonical
Two pages competing for one keywordNeither — merge them, then 301

The overlap case

Host and protocol variants deserve both. Redirect them at the server so only one version ever responds, then let the surviving page canonicalise to itself. That belt-and-braces order is covered properly in canonicalization.

Why Google ignores your canonical, and how to check

Google calls rel=canonical a hint. It weighs your declared canonical against internal links, sitemap entries, redirects, hreflang and which version users see more of. When those disagree with the tag, the tag loses.

So stop reading the HTML and read Search Console. Open URL Inspection, paste the URL, and look at two fields: User-declared canonical (what your tag says) and Google-selected canonical (what Google decided). When they differ, Google has told you plainly that it doesn't believe you.

In the Page Indexing report, the same disagreement shows up as Duplicate, Google chose different canonical than user. That's not an error to dismiss — it's a list of pages you thought were indexed and aren't.

The fix is almost never a better tag. It's making every other signal agree: link internally to the canonical URL only, list only the canonical URL in your XML sitemap, and make sure the canonical target returns a 200 rather than redirecting.

Related questions.

Does every page need a canonical tag?

Not strictly — Google will pick a canonical on its own. But a self-referencing canonical on every page is cheap insurance against parameters, session IDs and syndicated copies, and it removes the guesswork. Set it in the template so nobody has to remember.

Can a canonical tag point to a different domain?

Yes. Cross-domain canonicals are how syndication is meant to work — the publisher who reprints your article points back at your original. Google honours it more often than not, though as with any canonical it's a hint rather than a guarantee.

How do I add a canonical tag in WordPress?

You almost certainly already have one. Yoast and Rank Math both output self-referencing canonicals by default, with a per-page override field in the editor sidebar. View source and search for `rel="canonical"` before installing anything else — duplicate tags from two plugins are a common self-inflicted problem.

Does a canonical tag pass link equity?

Google consolidates the signals from duplicate URLs onto the canonical one, links included. It isn't a redirect and it doesn't move users, but for ranking purposes the canonical URL inherits what the duplicates earned.

Why does Search Console show a different canonical from mine?

Because your other signals contradict your tag. Usually internal links point at the non-canonical version, or the sitemap lists both, or the canonical target redirects. Fix the contradiction rather than re-writing the tag — Google is telling you which signal it trusts more.

Last slot's open

Make this the last growth call you book.

Grab the free strategy call and walk away with a 90-day growth plan — hired or not. Or just text us. Either way, you'll know exactly how we'd win.

Guaranteed or it's free · No lock-in · Free strategy call