Audits

Canonical Tags Explained: What They Do and When You Need One

7 min read

Many pages on a website can be reached at more than one address: with and without www, with a tracking code on the end, or sorted a different way in a shop. To a search engine these look like separate pages with the same content. A canonical tag tells it which one is the main version.

Fix these firstWHAT TO FIXEFFORTPage title is longShorten it, main keyword firstAbout 5 minutesMissing meta descriptionFix the description to about 150 charactersAbout 5 minutesRender-blocking scriptsShorten it, main keyword firstNeeds a developer12 competing calls to actionFix the description to about 150 charactersAbout an hour

This guide explains in plain words what a canonical tag is, when you need one, the mistakes that cause trouble and how to check yours. You do not need to be a developer to understand it.

The problem it solves

The same content can appear at several addresses. Examples are yourdomain.com and www.yourdomain.com, a page with and without a trailing slash, an address with ?utm_source=newsletter on the end, and a product listing sorted by price. Each is a different address to a search engine, even though a person sees the same page.

When search engines find several near identical versions, they have to guess which one to show. They may choose the wrong one, or split the value of links across the copies. A canonical tag removes the guesswork.

What a canonical tag is

It is a line in the head of a page, written as a link with rel="canonical" and the address of the preferred version. It says: if you find this content at several addresses, treat this one as the main page.

Google treats it as a strong hint rather than a command. It usually follows it, but it can choose a different version if other signals, such as redirects or internal links, point somewhere else. So the tag works best when the rest of the site agrees with it.

Addresses that can show the same pageWith and without wwwhttp and httpsWith and without a trailing slashWith a tracking code such as utm_sourceSorted or filtered versions in a shopPrintable or alternate versions
A canonical tag tells search engines which of these is the main one.

When you need one

Almost every page benefits from a self-referencing canonical, which points to its own address. It protects against accidental duplicates created by parameters and tracking codes. You especially need the tag on shops with filters and sorting, on blogs that can be reached through several categories, and on pages that also exist in a printable or tracking version.

If you have two genuinely different pages with the same content, a canonical can point one to the other. If you want the old address to disappear for visitors as well, use a permanent redirect instead.

Common mistakes

The most common are a missing canonical, a canonical that points to the wrong page, such as every page pointing to the home page, and one that points to a version that redirects or returns an error. Another is mixing http and https addresses, or www and non www, in the tag.

Sometimes a canonical conflicts with a noindex tag, which sends opposite messages. And a canonical that points to a page blocked by robots.txt cannot be read at all. If your tags are generated by a plugin, check a few pages by hand, because one wrong setting can affect the whole site.

How to check yours

View the page source and search for rel="canonical". There should be exactly one, with the full address of the page you want to appear in search. Check that it uses https, the right domain version and the same form of the address your sitemap lists.

In Google Search Console, the URL Inspection tool shows which address Google chose as the canonical, and the pages report lists pages that Google treated as duplicates. If Google chose a different canonical than you declared, find out why before changing the tag.

Check your canonical1View the pagesource2Search forrel=canonical3Confirm exactlyone tag4Check it useshttps and theright domain5Check Googlechose the sameone
Search Console's URL Inspection shows which address Google picked.

Fixing it and keeping it fixed

On WordPress, SEO plugins add self-referencing canonicals by default and let you override them. On Shopify, the theme usually handles it, and filtered collection pages point back to the main collection. On a custom site, add the tag in the page template and build the address from the page's own path.

A SEO Audit reports whether the page you test has a canonical and whether it matches, and a Whole-Site Crawl shows pages across your site without one. Since a redesign or plugin change can remove it, check again after any such change. For the wider checks, see the technical SEO audit checklist.

Frequently asked questions

What is a canonical tag?

A line in a page's code that names the preferred address for that content, so search engines know which version to treat as the main one when duplicates exist.

Is a canonical tag the same as a redirect?

No. A redirect sends visitors and search engines to another address. A canonical only advises search engines. People can still reach both addresses.

Do I need a canonical tag on every page?

A self-referencing canonical on each page is good practice. It protects against duplicates created by parameters, tracking codes and alternate addresses.

Does Google always follow my canonical?

No. It treats the tag as a strong hint and may choose a different page if other signals disagree, such as redirects, internal links or the sitemap.

What if my canonical points to the wrong page?

Fix it, because it can lead search engines to ignore the page you wanted shown. Make sure it uses the exact preferred address, including https and the right domain version.

Keep reading

Request the SEO Audit for your own site

This article covers the checks. Request the SEO Audit for your page and see a free preview of the report.

Free preview · Full report and action plan on request