A canonical tag is a line of code in a page's head that tells search engines which URL is the main version when the same or almost the same content can be reached at several addresses. You effectively designate the "official" version, so search engines don't have to choose between a set of variants themselves.
This happens more often than you might think. A single product page can be reachable via different categories, with or without sorting parameters, with tracking codes from a newsletter, or in a print version. For a visitor, it is all the same page. For a search engine, they are in principle different URLs. Without a clear signal, the search engine chooses for itself, and that isn't always the version you had in mind.
The tag looks like this: a link element with rel="canonical" and the URL of the preferred version. You place it on all variants, and ideally on the main page itself too, which then points to itself. Google treats the canonical tag as a strong hint, not a binding instruction. If other signals, such as your internal links, your sitemap or redirects, say something different, Google may choose another URL as the canonical version.
An example: an online shop for coffee machines in Manchester shows the same espresso machine under "Bean-to-cup", "Offers" and "Brand X". Three URLs, one product. With a canonical tag pointing to one fixed product page, you avoid duplicate content and the signals are consolidated at one address. Visitors can still find the product via any category, so nothing changes for the user experience.
These three are often confused. A 301 redirect actually sends visitors and search engines elsewhere; use it when the old URL is no longer needed. A canonical tag keeps both pages accessible to visitors, but asks search engines to show one of them. A noindex asks for a page not to be included in the search results at all. It is best not to combine canonical and noindex on the same page, as that sends conflicting signals.
For AI search engines, an unambiguous version of your content is useful too: the clearer it is which page is the source, the smaller the chance an outdated or different variant gets cited. Because canonical errors often sit in templates and so affect hundreds of pages at once, a periodic technical SEO analysis is the safest way to track them down.
Request your free AI visibility plan. An expert analyses your business and contacts you within 1 working day to present your plan in person.