A canonical URL is the preferred address for a page. The canonical tag (rel="canonical") in the page’s HTML tells Google: “if you find this content at several addresses, this is the one to index and rank”.
Why duplicates happen
The same page is often reachable at several URLs without anyone meaning it to be:
- with and without
www, orhttpandhttps - with and without a trailing slash
- with tracking parameters such as
?utm_source=newsletter - filtered or sorted e-commerce category pages
- the same product in several categories
Without a canonical, Google picks one itself and may split ranking signals between versions.
Canonical or redirect?
If a URL should never be visited, use a 301 redirect. If both versions need to work for visitors (filters, tracking links), use a canonical.
Good practice
- Every indexable page should carry a self-referencing canonical.
- Canonicals must point at a live page that returns 200, not a redirect or a 404.
- Only list canonical URLs in your XML sitemap.
Related terms
SEO
Search engine optimisation: improving your website so it ranks higher in Google's unpaid results and wins more visits from people already searching.
301 redirect
A 301 redirect permanently sends visitors and search engines from an old URL to a new one, passing on most of the old page's ranking value.
XML sitemap
An XML sitemap is a file listing the pages you want search engines to find and index, helping Google discover new and updated content more quickly.
robots.txt
robots.txt is a small text file at the root of your site that tells search engine and AI crawlers which areas they may or may not crawl.