Canonical URL
What is a canonical URL?
A canonical URL is an HTML tag that tells search engines which version of a page is the "original" and should be indexed. It's used when the same or very similar content is available at multiple URLs — a situation far more common than one might think.
What does the canonical tag look like?
<link rel="canonical" href="https://example.com/article" />
This tag is placed in the <head> section of an HTML page. It tells Google: "this is the preferred URL for this content — index this one, not the other variants."
The canonical URL can also be specified in the HTTP response header (Link: <URL>; rel="canonical") — useful for PDFs and other resources without a <head> section.
When to use canonical?
A canonical URL is essential wherever the same content is available at multiple addresses. The most common scenarios:
- URL parameters —
/products?sort=priceand/products?sort=namehave the same content, differing only in sorting - www/non-www versions —
www.example.comvsexample.com - HTTP/HTTPS —
http://vshttps://(although this should be resolved with a 301 redirect) - Trailing slash —
/articlevs/article/ - Content syndication — when the same article appears on multiple sites (e.g., a reprint on an industry portal)
- Mobile versions —
m.example.comvsexample.com(less common with responsive design) - Pagination —
/blog?page=1,/blog?page=2may have a canonical pointing to the main category page - Product variants — the same product in different colors under different URLs
Why is canonical important?
Without a canonical URL, Google has to decide on its own which page variant to index — and it often chooses incorrectly. The consequences of missing canonicalization can be serious — which is why it's a key item in every SEO audit:
Duplicate content issues
- Authority dilution — backlinks pointing to different URL variants don't aggregate; instead of one strong page, you have several weak ones
- SERP cannibalization — multiple versions of the same content compete against each other in search results
- Wasting crawl budget — Google wastes time crawling duplicates instead of discovering new content
- Inaccurate analytics — traffic split across multiple URLs makes analysis difficult
Benefits of proper canonicalization
- Authority consolidation — all ranking signals go to a single, preferred URL
- Clean data in Google Search Console — one URL per piece of content, easy analysis
- Control over the index — you decide what Google indexes
- Better crawlability — the crawler uses the budget more efficiently
How to properly implement canonical?
Implementation rules
- Every page should have a canonical — even if it points to itself (self-referencing canonical). You can find the full list of elements to verify in the technical SEO checklist
- Canonical must point to the HTTPS version — always use a full, absolute URL
- Canonical should point to a 200 page — not to a redirect or a 404 page
- One canonical per page — multiple canonical tags on a single page are ignored
- Consistency with other signals — canonical should align with sitemap, hreflangs, and internal linking
Common mistakes
- Canonical to a noindex page — conflicting signals; Google may ignore both
- Canonical chains — A -> B -> C; Google may not follow the chain
- Canonical to a page with different content — Google ignores the canonical if the content significantly differs
- Missing canonical on pagination pages — leads to indexing of hundreds of
/page/2,/page/3pages
Canonical URL: Relative or Absolute?
Use an absolute URL. A relative canonical such as /article is valid HTML and Google can process it, but the browser and the crawler resolve it against whatever protocol and host served the page. On an http:// copy, a www variant, or a staging server, it points to that copy instead of the version you want indexed.
Google's own documentation recommends absolute URLs for rel="canonical" for the same reason. Two details are easy to miss:
- A path without a leading slash (
article) resolves relative to the current directory. On/blog/articleit points to/blog/article, but if the same page is also reachable at/archive/article, there it points to/archive/article— each copy names itself as the original. - Templates that build the canonical from the request inherit the same problem as a relative URL. The canonical should come from one configured base URL, not from the host name of the current request.
Canonical vs 301 redirect
Canonical is a "suggestion" for Google — the search engine may ignore it. A 301 redirect is a "directive" — the browser and crawler are physically redirected. When possible, prefer a 301 redirect over canonical — it's a stronger signal.
| Situation | Solution |
|---|---|
| One piece of content, one correct URL, the rest to be removed | 301 redirect |
| One piece of content, multiple URLs must exist (parameters, sorting) | Canonical |
| Content syndication on an external site | Canonical |
| Domain migration | 301 redirect + canonical |
Canonical Domain: Choosing One Host Name
The canonical domain is the single combination of protocol and host name you want search engines to index — for example https://example.com, not http://example.com or https://www.example.com. Choose one version, redirect every other version to it with a 301, and use it consistently in canonical tags, the sitemap, and internal links.
- www or non-www. Neither version ranks better on its own. What matters is that only one of them serves content and the other returns a 301 for every path, not just the homepage.
- HTTP and HTTPS. HTTPS should be the canonical protocol. A canonical tag on an HTTP page that points to HTTPS helps, but the HTTP version should also redirect.
- Several domains with the same content. When an old domain, a misspelled domain, or a campaign domain serves a copy of the site, redirect it to the canonical domain. A cross-domain canonical tag is a weaker substitute for cases where the copy has to stay online.
- Checking what Google chose. The URL Inspection tool in Google Search Console shows both the canonical you declared and the one Google selected. When they differ, look for signals that contradict each other, such as redirects, sitemap entries, or internal links pointing to different versions.
Related terms
- Duplicate content — the problem that canonical solves
- 301 Redirect — permanent redirect, an alternative to canonical
- Crawlability — the ability of crawlers to traverse a website
- Indexing — the process of recording a page in Google's index
- Crawl budget — crawl budget, wasted by duplicates