What is a canonical URL?
A canonical URL is the one address, out of a set of duplicate or near-duplicate pages, that a search engine chooses to index and show. Duplicates are more common than they sound: the same page with and without a trailing slash, with tracking parameters, with a sort order, on http and https, or under two categories.
What is a canonical tag?
A canonical tag is a link element with rel="canonical" in the head of a page, naming the URL you want treated as the main version. Every duplicate points to the preferred page, and the preferred page points to itself.
How does Google choose the canonical?
You state a preference. Google makes the decision. Its documentation lists the methods in order of how strongly they influence the choice:
| Method | Strength of signal |
|---|---|
| Redirects | Strong |
| rel="canonical" link annotations | Strong |
| Sitemap inclusion | Weak |
The methods stack, so using more than one, consistently, makes your preferred URL more likely to be chosen. Google also says none of them are required: if you specify nothing, it will pick the version it judges best.
Why set a canonical URL?
- To control which address appears in search results.
- To consolidate signals, such as links pointing at different versions, onto one URL.
- To keep reporting clean, with one row per page instead of five.
- To avoid crawlers spending time on duplicates.
Canonical tag vs 301 redirect vs noindex
Use a redirect when the duplicate should not exist for visitors at all. Use a canonical tag when both versions need to stay reachable, such as a filtered product list. Do not use noindex to pick a canonical within one site: Google advises against it because it removes the page from search entirely. And do not use robots.txt for this, since a blocked URL can still be indexed without its content.
Canonical tag best practices
Add a self-referencing canonical to the main version, use absolute URLs, link internally to the canonical address, list only canonical URLs in the sitemap, and never give two methods different answers for the same page.