To a person, example.com/shoes, www.example.com/shoes and example.com/shoes?sort=price look like the same page. To a search engine, they are three different URLs with identical content. That can split ranking signals and confuse which version should appear in results. So what is a canonical URL, and how does one small tag solve the problem?
The definition
A canonical URL is the preferred version of a page – the one you want search engines to index and show. You declare it with a tag in the page's <head>:
<link rel="canonical" href="https://example.com/shoes">
Every duplicate or near-duplicate version points to that same address, so search engines consolidate signals such as links into one URL.
Where duplicate content comes from
Most duplicate content is accidental, not copied:
- www vs non-www: example.com and www.example.com
- HTTP vs HTTPS
- Trailing slashes: /shoes and /shoes/
- URL parameters: sorting, filtering and tracking codes such as ?utm_source=whatsapp
- Print or AMP versions of the same page
- Products in several categories, each with its own URL
- Syndicated content – the same article published on partner sites
How canonical tags help
- Consolidate links and ranking signals into one URL
- Choose which URL appears in search results
- Prevent the wrong version (for example, one with tracking parameters) from being indexed
- Reduce wasted crawling on duplicates
Best practices
- Use absolute URLs including https:// and the correct domain.
- Add self-referencing canonicals: each normal page points to itself. This protects against parameter versions.
- Keep everything consistent: internal links, sitemap URLs and canonicals should all use the same preferred format.
- Point to an indexable page that returns 200 OK – not to a redirect or a 404. Check with the HTTP Status Code Checker.
- One canonical per page. Multiple tags are ignored.
Canonical vs 301 redirect vs noindex
- Use a 301 redirect when the duplicate URL should not exist for visitors at all, such as http to https. See what is a 301 redirect.
- Use a canonical tag when both versions need to work for visitors (for example, sorted product lists) but only one should rank.
- Use noindex when a page should not appear in search at all.
Remember that a canonical is a strong hint, not a command. If other signals disagree – for example your sitemap lists a different version – search engines may choose their own canonical.
Do not block duplicates in robots.txt
If you block a duplicate URL in robots.txt, search engines cannot see its canonical tag, so they cannot consolidate it properly. Read what is robots.txt for what that file should and should not do.
Generate and check canonicals
The free Canonical URL Generator cleans a URL – removing tracking parameters, normalising case and slashes – and produces the correct tag. The URL Parser breaks any address into its parts so you can see exactly where versions differ.
In Google Search Console, the URL Inspection tool shows both your declared canonical and the one Google selected.
Frequently asked questions
Does every page need a canonical tag? It is good practice. Most modern CMSs and SEO plugins add self-referencing canonicals automatically.
Can I canonicalise to another domain? Yes – useful when your article is republished elsewhere and you want the original to rank.
Will a canonical tag remove the duplicate from Google? Usually Google stops showing it in results over time, but it may still crawl it.
Summary
So, what is a canonical URL? The preferred address of a page, declared with a rel=canonical tag so search engines consolidate duplicates into one. Use self-referencing canonicals, keep URLs consistent and use redirects when duplicates should not exist at all. Create clean tags with the free Canonical URL Generator.