Canonical URL (rel=canonical)
Also Known As
TL;DR
Explanation
Duplicate content arises when the same or very similar content is accessible at multiple URLs — example.com/page, www.example.com/page, example.com/page?ref=newsletter, example.com/page/ (with trailing slash). Without canonical, search engines may index all variants as separate pages, splitting link equity and confusing ranking. The canonical element (introduced 2009 by Google, Yahoo, and Microsoft) signals the preferred URL. Rules: must be an absolute URL including scheme and domain; should be self-referencing on canonical pages; paginated pages should have self-referencing canonicals unless you intentionally want pagination excluded from indexing. Canonical is a strong signal, not a directive — Google may override it if the canonical and current page have significantly different content.
Common Misconception
Why It Matters
Common Mistakes
- Relative canonical URL (/page/) — must be absolute (https://example.com/page/); relative canonicals may be ignored by Google.
- All paginated pages pointing canonical to page 1 — de-indexes pages 2+ which may contain unique content.
- Missing canonical on every page type — even the homepage needs a self-referencing canonical to handle www vs non-www variants.
- Canonical pointing to a redirecting URL — canonical should point to the final destination URL, not an intermediate redirect.
Avoid When
- Do not use canonical as a substitute for a 301 redirect — if a page has moved permanently, redirect it.
- Do not point paginated pages to page 1 unless you intentionally want pagination excluded from search results.
When To Use
- Add a self-referencing canonical to every page as standard practice.
- Use canonical to point URL parameter variants (tracking, filters) to the clean canonical URL.
- Use cross-domain canonical when your content is syndicated — point from the syndicated copy to the original.
Code Examples
<!-- Relative canonical — may be ignored -->
<link rel="canonical" href="/products/blue-mug">
<!-- All paginated pages pointing to page 1 -->
<!-- On /products?page=3: -->
<link rel="canonical" href="https://example.com/products">
<!-- Self-referencing absolute canonical on every page -->
<link rel="canonical" href="https://example.com/products/blue-mug">
<!-- Paginated: self-referencing on each page -->
<!-- On /products?page=3: -->
<link rel="canonical" href="https://example.com/products?page=3">
<!-- Product with URL parameters: canonical to clean URL -->
<!-- On /products/blue-mug?ref=newsletter&utm_source=email: -->
<link rel="canonical" href="https://example.com/products/blue-mug">