What Is a Canonical Tag? (And When to Use One)

A canonical tag tells search engines which version of a page is the original. Learn what it does, when you need one and the mistakes to avoid.

George Faulkner· · 3 min read

A canonical tag is a short line of HTML that tells search engines which address is the main version of a page. If the same content can be reached at more than one URL, it says "this is the original, please show this one in search results".

What a canonical tag looks like

It goes in the <head> of the page:

<link rel="canonical" href="https://www.example.com/oak-dining-tables" />

The href is the address you want search engines to treat as the real one. It should be a full, absolute URL, including https://.

Why canonicals exist

Websites create duplicate addresses all the time without anyone noticing:

  • https://example.com/shoes and https://www.example.com/shoes
  • /shoes and /shoes/ (with a trailing slash)
  • /shoes?utm_source=newsletter (tracking parameters)
  • /shoes?sort=price (sorted or filtered versions)
  • a product that appears in two categories, like /men/trainers/runner and /sale/runner

To you, these are one page. To a search engine, each is a separate URL with the same content. Without a canonical, Google has to pick which version to show, and it may split ranking signals such as links between them.

When to use a canonical tag

On every page, pointing at itself

A self-referencing canonical (one that points at the page's own address) is good practice. It means that if someone links to your page with extra parameters, search engines still know the clean address. FormedEasy flags pages without one as Canonicals: Missing.

On duplicate or near-duplicate pages

If you have pages that need to exist for visitors but shouldn't compete in search, such as sorted product lists, printer-friendly versions or a product listed in two categories (a common cause of duplicate title tags), point their canonical at the main version.

Canonical tag or redirect?

The tag is a strong hint, not an instruction. Google usually follows it, but can choose a different page if the signals disagree.

  • Use a 301 redirect when visitors don't need the duplicate address at all, for example http:// to https://, or an old page that has moved.
  • Use a canonical when the duplicate page needs to keep working for visitors, for example filtered views or tracking links.

Common mistakes

  1. Pointing at a page that doesn't work. A canonical pointing at a redirect, a 404 or a page blocked by robots.txt sends search engines to a dead end.
  2. Relative URLs. href="/shoes" usually works, but a full URL removes any doubt.
  3. More than one canonical. If a page has two that disagree, search engines may ignore both. This often happens when a theme and a plugin both add one.
  4. Canonicalising every page to the home page. This tells Google that all your pages are copies of the home page, so they may drop out of search.
  5. Mixing signals. A page whose canonical points elsewhere shouldn't also be listed in your sitemap. Only list the pages you want to appear in search.

How to check your canonicals

Open a page, view its source and search for rel="canonical". That works for one page. To check every page at once, run a site audit: FormedEasy lists pages that are missing one (Canonicals: Missing) and pages that point their canonical somewhere else (Canonicals: Canonicalised), with the affected URLs for each.

Google's guide to consolidating duplicate URLs explains how it chooses a canonical in more depth.

Summary

A canonical tag tells search engines which version of a page is the original. Give every page a self-referencing canonical, point duplicates at the main version, use redirects when the duplicate doesn't need to exist, and make sure every canonical points at a working, indexable page.

Find issues like this on your site

FormedEasy crawls your website, scores it out of 100 and gives you a prioritised list of what to fix. Free to start, no software to install.

More guides