What is a Canonical Tag & How/When to Use It?
Canonical tags tell search engines which page is the main/original version when you have similar or duplicate pages. Without them, Google may get confused, split your ranking power, or show the wrong page.
A canonical tag looks like this:
<link rel=”canonical” href=”https://example.com/main-page/” />
It helps Google avoid duplicate content issues and ensures the correct page gets ranked.
Why Is a Canonical Tag Important?
Search engines don’t like duplicate or similar pages because they don’t know which one to rank.
Canonical tags solve this by:
Preventing duplicate content issues
Combining ranking signals from similar pages
Avoiding keyword cannibalization
Ensuring Google indexes the correct URL
Improving your overall SEO performance
How Does a Canonical Tag Work?
Imagine you sell shoes and have these URLs:
https://example.com/shoes
https://example.com/shoes?color=black
https://example.com/shoes?ref=ads
https://example.com/shoes/page1
All these pages show the same product.Google might think you have duplicate content.
So, you add a canonical tag on all versions:
<link rel=”canonical” href=”https://example.com/shoes” />
Now Google understands that /shoes is the main page and will rank that page in search results.
When Should You Use a Canonical Tag?
Use a canonical tag in these common cases:
1. Duplicate Content Pages
If you have copy or similar content across pages
Example:
Blog posts published under multiple categories → both pages should point to the original URL.
2. E-commerce Product Variations
If the same product has different colors, sizes, or filters.
Example:
/tshirt?color=red
/tshirt?size=XL
/tshirt?ref=discount
All can point to the main product page.
3. HTTPS and HTTP Versions
If both versions exist, set the HTTPS version as canonical.
4. www and non-www URLs
Choose one and set it as the canonical version.
5. Pagination Pages
Example:
Page 1, Page 2, Page 3 of category pages
→ Point all to the main category page
OR
Use rel=”next” and rel=”prev” (Google still understands these, even though officially “not used”).
6. Syndicated or Republished Content
If your blog is published on another site, add a canonical link to your original article.
Common Mistakes to Avoid
Don’t set every page’s canonical to the homepage
Don’t use multiple canonical tags on a single page
Don’t canonicalize to a URL that doesn’t exist
- Always use absolute URLs, not relative ones