Canonical Tag Guide
What is a Canonical Tag?
A canonical tag (<link rel="canonical">) tells search engines which version of a page is the "preferred" or "master" version when duplicate or similar content exists at multiple URLs.
Common Use Cases
1. www vs non-www
Both https://example.com and https://www.example.com serve the same content.
<link rel="canonical" href="https://www.example.com/">
2. HTTP vs HTTPS
Always canonicalize to the HTTPS version.
<link rel="canonical" href="https://example.com/page">
3. Trailing Slash
Pick one form and canonicalize to it consistently.
<link rel="canonical" href="https://example.com/page/">
4. URL Parameters
Filter/sort/tracking parameters create duplicate content.
<!-- /products?sort=price&color=red โ canonical to clean URL -->
<link rel="canonical" href="https://example.com/products">
5. Pagination
Each paginated page should self-canonicalize (not to page 1).
<!-- On /blog/page/2 -->
<link rel="canonical" href="https://example.com/blog/page/2">
6. Cross-Domain Syndication
If your content is republished elsewhere, add a canonical back to your original.
<link rel="canonical" href="https://original-site.com/article">