A canonical tag is one line of HTML, <link rel="canonical" href="https://example.com/page/">, that tells Google which URL is the main copy of a page when the same content can be reached at several addresses. Google treats it as a strong hint, not an order, so it decides which URL to show in search results, and your job is to make that choice easy.
Most small business sites need very little canonical work. Your platform probably adds the tag already, and Google says your site “will likely do just fine without specifying a canonical preference” in its canonical URL guide. The tag matters when the wrong version of a page shows up in Google, or when a plugin or theme sets it to the wrong address.
What the tag actually does
Google’s canonicalization page lists the usual causes: http and https versions, separate mobile and desktop pages, sort and filter options on a category page, and demo or staging copies left open to crawlers. Add tracking links such as ?gclid= from Google Ads and a single service page can have five or six addresses.
When Google finds pages with the same or very similar main content, it groups them and picks one as the canonical. That URL is crawled most often, used to judge the content, and usually shown in results. The others are crawled less. Google says duplicate content like this is normal and “not a violation of Google’s spam policies,” so the tag isn’t about avoiding a penalty. It does three useful things:
- It picks the URL people see. A clean
/brake-repair/beats/brake-repair/?utm_source=facebookin a search result. - It pools signals. Links pointing at the duplicates get consolidated with the canonical, so you don’t split them across addresses.
- It keeps reporting clean. One URL per page means one row per page in Search Console.
Where it goes and how to write it
The tag goes in the <head> of the page. Google only accepts it there, so a canonical placed in the body, or after broken HTML that closes the head early, is ignored. Use the full address, including https:// and the right www or non-www version. Google supports relative paths such as /brake-repair/, but its guide warns they “can cause problems in the long run,” for example when a staging copy of the site gets crawled.
Put the same tag on the main page itself, pointing at its own URL. Google recommends this self-referencing canonical, and it’s what most platforms do by default. For PDFs and other files that have no <head>, the same instruction can be sent as a Link: <https://example.com/file.pdf>; rel="canonical" HTTP header. Pick one method per page. Google says using both the tag and the header “is more error prone” because they can drift apart.
On common platforms you rarely type the tag by hand:
- WordPress with Yoast SEO adds a self-referencing canonical to every post and page. To change one, open the page, go to the Yoast sidebar, then Advanced, and enter the full URL in the Canonical URL field, as Yoast’s help page describes.
- Shopify themes print the tag from a Liquid object called
canonical_url. Edit it only if a theme or app is producing the wrong address. - Other builders often have a search engine settings page. Google’s own advice is to search for “[your platform] set the canonical element.”
The tag is one of three signals
Google lists the ways to state a canonical in order of strength. A permanent redirect is a strong signal, the rel="canonical" tag is a strong signal, and listing the URL in your sitemap is a weak one. The signals stack, so using two or three that agree makes your choice more likely to stick. Google also prefers HTTPS over HTTP on its own and uses your internal links as a hint, so link to the canonical version everywhere on your site.
Use a redirect, not a tag, when a duplicate shouldn’t exist at all, such as the http version of the whole site or an old page you replaced. Use the tag when the duplicate needs to keep working for visitors, such as a URL with tracking or filter parameters. The technical SEO checklist covers the sitewide redirects.
The mistakes that break it
Google’s guide and its canonicalization troubleshooting page name the same handful of errors. Each one either sends mixed signals or points Google at a page it can’t use.
- Pointing the canonical at a page that redirects, 404s or is set to noindex. Screaming Frog’s canonicals audit guide flags these as “Non-Indexable Canonical” and says a canonical should always be an indexable page that returns 200.
- Disagreeing signals. Don’t list one URL in the sitemap and name a different one in the tag. Don’t add two canonical tags to one page, which often happens when a theme and an SEO plugin both print one.
- Using robots.txt or noindex to pick a canonical. A URL blocked in robots.txt can still be indexed without its content, and noindex removes the page from Search entirely. Google calls the canonical tag “the preferred solution.”
- Canonicalizing every page of a series to page 1. Google’s pagination guide says to give each page of a paginated list its own canonical, so products on page 3 stay findable.
- Pointing at a URL with a
#fragment. Google generally doesn’t support fragments, so the tag gets ignored. - Relying on JavaScript to set or change it. If you can, put the canonical in the HTML source and make sure scripts don’t rewrite it.
Check the first one after any redesign, when old canonicals can still point at URLs that now redirect.
How to check a canonical tag
You don’t need a paid canonical tag checker. Three free checks cover a small site.
In the browser. Open the page, right-click and choose View page source, then search for canonical. You should find exactly one tag, in the head, with a full URL that matches the page you’re on.
In Search Console. Paste the URL into URL Inspection and open the Page indexing section. “User-declared canonical” is what your tag says. “Google-selected canonical” is what Google picked. Google notes you can only see its choice in the indexed result: the live test “cannot predict” whether a version will be chosen as canonical. If the two fields match, you’re done.
With a crawler. The free version of Screaming Frog crawls up to 500 URLs, and its Canonicals tab sorts pages into filters such as Missing, Canonicalised, Non-Indexable Canonical and Canonical Is Relative. Fix anything in Non-Indexable Canonical first, then look at Multiple Conflicting. The same crawl you run with internal linking tools works.
When Google picks a different canonical
In the Page indexing report, two statuses relate to canonicals. “Duplicate without user-selected canonical” means Google found copies with no tag and chose one itself. Google says this “is not an error.” Add a tag only if it chose the wrong one. “Duplicate, Google chose different canonical than user” means Google overruled your tag, usually because the pages are less different than you think or other signals point elsewhere.
For the second case, compare the pages side by side. Google’s troubleshooting page says fixing canonical problems “boils down to ensuring that the pages that are clustered together are sufficiently different,” and that Google “might hold pages in a duplicate cluster for up to two weeks” after you fix them. Then use Request Indexing on your most important URLs only, as it has a quota. The technical SEO issues guide covers the other reasons a wrong URL ranks.
FAQ
Are canonical tags necessary?
No. Google says most sites will do fine without stating a canonical, because it picks the best URL itself. They are worth having on any page that can be reached with parameters, and most platforms add a self-referencing one for you.
Does a canonical tag stop a page being indexed?
Not directly. It asks Google to index the canonical version instead, and Google usually does, but it can ignore the hint. If a page must never appear in Search, use noindex or remove it, not a canonical.
Can a canonical point to another domain?
It can, and Google may follow it, which is why its troubleshooting page warns that hacked sites sometimes get a cross-domain canonical inserted. For syndicated articles, Google doesn’t recommend the canonical tag because partner pages are often very different. It suggests the partner blocks indexing of the copy instead.
Check one page before you touch the rest
Run URL Inspection on your three most important pages today and compare the two canonical fields. If they match on all three, your canonicals are fine and you can move on. If they don’t, view the source of that page, find which tag or plugin produced it, and fix that one template. The same fix usually covers every page built from it.
