What is a canonical tag?
When the same page can be reached at more than one address, a canonical tag tells search engines which one is the main version. It is a link element in the page's head:
<link rel="canonical" href="https://www.example.co.uk/boiler-repair">
Duplicates happen more often than people think: with and without www, http and https, tracking parameters such as ?utm_source=newsletter, sort and filter options on shop pages, and a product listed in two categories. Without a canonical, Google picks a version itself, and it may not be the one you want in results.
Google treats rel=canonical as a strong signal, not an order. It weighs it alongside redirects, internal links, sitemaps and HTTPS when it chooses, so make those signals agree.
Canonical tag or 301 redirect?
If visitors never need the duplicate address, redirect it (a 301) to the main one: http to https, or non-www to www, for example. Use a canonical tag when both addresses must keep working, such as a page with tracking parameters or a product that sits in two categories.
Common canonical mistakes and how to fix them
- Every page pointing to the homepage. Often a theme or plugin setting. It tells Google your pages are copies of the homepage. Each page should name itself, or the page it really copies.
- Pointing to a URL that redirects, errors or is noindexed. Point straight at the final, live, indexable address.
- Relative URLs. Google supports them but recommends full absolute URLs (starting https://), which can't be misread.
- More than one canonical. A theme and an SEO plugin can both add one, sometimes with different URLs. Keep one: Google says not to send conflicting canonical signals.
- A canonical plus noindex. They send opposite messages, and Google advises against using noindex to choose a canonical within a site.
- A canonical outside the head. Google only accepts rel=canonical in the
head. A tag injected lower down the page is ignored.
How to see which canonical Google chose
In Google Search Console, inspect the address with URL Inspection. It shows the “user-declared canonical” (yours) and the “Google-selected canonical”. If they differ, look for the signal pulling the other way: a redirect, internal links to the other version, or a sitemap that lists it.