Canonical URLs: Fix Duplicate Content in 5 Minutes
4 min read
Canonical URLs: Fix Duplicate Content in 5 Minutes
Reading time: 4 minutes
TLDR
Canonical tags tell Google which version of duplicate pages is the original when your content is accessible through multiple URLs. Without them, Google splits rankings across all versions and may penalize you for duplicate content. Add a canonical tag to your page head pointing to the preferred URL. WordPress plugins like Yoast and RankMath add these automatically. Scan checks for missing or incorrect canonical tags and helps you fix duplicate content in minutes.
If your Scan report shows “duplicate content” or “duplicate titles,” canonical tags tell Google which version is the original. Here’s how to fix it.
The Problem
Your homepage can be accessed multiple ways:
https://yoursite.com
https://yoursite.com/
https://www.yoursite.com
https://yoursite.com/index.html
http://yoursite.com (if HTTPS not forced)
To you: These are all the same page.
To Google: These are 5 different pages with identical content = duplicate content penalty.
The Solution: Canonical Tags
Add one line to your HTML <head>:
<link rel="canonical" href="https://yoursite.com/" />
This tells Google: “This page’s original version is at https://yoursite.com/“
How to Implement
WordPress
Option 1: Yoast SEO (automatic)
- Install Yoast SEO plugin
- It automatically adds canonical tags to every page
- Points to the current page URL (self-referencing)
Option 2: Rank Math (automatic)
- Install Rank Math plugin
- Settings → General → Canonical URL → Enable
- Auto-adds to all pages
Shopify
Canonical tags auto-added by default. No action needed.
Custom HTML Site
Add to every page’s <head>:
<head>
<title>Your Page Title</title>
<link rel="canonical" href="https://yoursite.com/page-url/" />
</head>
Important: Use absolute URLs (full https://yoursite.com/page), not relative URLs (/page).
Common Scenarios
Scenario 1: Homepage Variations
Problem: / and /index.html show same content
Fix:
<!-- On both / and /index.html -->
<link rel="canonical" href="https://yoursite.com/" />
Add 301 redirect from /index.html to /:
# In .htaccess
RewriteEngine On
RewriteRule ^index\.html$ / [R=301,L]
Scenario 2: WWW vs Non-WWW
Problem: www.yoursite.com and yoursite.com both work
Fix: Choose one as canonical (usually non-WWW), redirect the other:
# Force non-WWW in .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yoursite\.com [NC]
RewriteRule ^(.*)$ https://yoursite.com/$1 [L,R=301]
Plus canonical tag:
<link rel="canonical" href="https://yoursite.com/" />
Scenario 3: URL Parameters
Problem: Same page accessed with tracking parameters:
https://yoursite.com/product
https://yoursite.com/product?utm_source=email
https://yoursite.com/product?ref=twitter
Fix: All versions point to clean URL:
<link rel="canonical" href="https://yoursite.com/product" />
Google treats all as one page, preserves your analytics tracking.
Scenario 4: Pagination
Problem: Blog archives:
https://yoursite.com/blog
https://yoursite.com/blog?page=2
https://yoursite.com/blog?page=3
Fix: Each page is self-referencing canonical:
<!-- On page 2 -->
<link rel="canonical" href="https://yoursite.com/blog?page=2" />
Don’t point all pages to page 1. Each page is unique content.
Self-Referencing Canonicals
Best practice: Every page should have a canonical tag pointing to itself.
<!-- On https://yoursite.com/about -->
<link rel="canonical" href="https://yoursite.com/about" />
Why:
- Prevents accidental duplicate issues
- Clarifies to Google this is the preferred URL
- Protects against scrapers (if someone copies your content, canonical shows original)
Testing Canonical Tags
Check Current Canonicals
View source:
- Right-click page → View Page Source
- Search for
canonical - Should see one
<link rel="canonical">tag
Inspect element:
- F12 → Elements tab
- Look in
<head>section - Find
<link rel="canonical">
Validate with Google
Google Search Console:
- URL Inspection tool
- Enter your URL
- Check “Coverage” section
- Shows canonical URL Google is using
If Google’s canonical ≠ your canonical:
- You have conflicting signals
- Fix: Remove redirect chains, ensure only one canonical per page
Common Mistakes
Mistake 1: Multiple Canonicals
Wrong:
<link rel="canonical" href="https://yoursite.com/" />
<link rel="canonical" href="https://yoursite.com/index.html" />
Google ignores both if there are multiple.
Right:
<link rel="canonical" href="https://yoursite.com/" />
One canonical per page.
Mistake 2: Relative URLs
Wrong:
<link rel="canonical" href="/about" />
Use absolute URLs.
Right:
<link rel="canonical" href="https://yoursite.com/about" />
Mistake 3: Pointing to Non-Existent Page
Wrong:
<!-- Page exists at /services but canonical points elsewhere -->
<link rel="canonical" href="https://yoursite.com/old-services" />
If canonical URL returns 404, Google ignores it.
Right: Canonical should point to live, accessible URL.
Mistake 4: HTTPS Page → HTTP Canonical
Wrong:
<!-- On HTTPS page -->
<link rel="canonical" href="http://yoursite.com/" />
Don’t downgrade security.
Right:
<link rel="canonical" href="https://yoursite.com/" />
Canonical vs 301 Redirect
When to use canonical tags:
- Same content accessible via multiple URLs intentionally (tracking parameters)
- Can’t implement server-side redirect
- Syndicated content (your article published on other sites points back to you)
When to use 301 redirects:
- Permanently moved content
- Old URL should never be used again
- Can implement server-side redirect
Best practice: Use BOTH.
- 301 redirect:
example.com/old→example.com/new - Canonical on new page:
<link rel="canonical" href="https://example.com/new" />
Syndicated Content
If your content appears on other sites (Medium, LinkedIn, etc.), ask them to add canonical pointing to your original:
<!-- On Medium republished version -->
<link rel="canonical" href="https://yourblog.com/original-article" />
This tells Google:
- Your site is the original source
- Give you the SEO credit
- Don’t penalize either site for duplicate content
Quick Wins
This week:
- Check your homepage for canonical tag
- Add if missing:
<link rel="canonical" href="https://yoursite.com/" /> - Verify with View Source
This month:
- Add canonical tags to all pages (use plugin if WordPress/Shopify)
- Set up 301 redirects for known duplicate URLs
- Check Google Search Console for duplicate content issues
Expected result:
- Week 1-2: Canonical tags added
- Week 3-4: Google re-crawls pages
- Month 2: Duplicate content issues resolved in Search Console
→ Related: 301 vs 302 Redirects | XML Sitemaps Explained
Next Steps
Was this helpful?
Thanks for your feedback!
Have suggestions for improvement?
Tell us moreHelp Us Improve This Article
Know a better way to explain this? Have a real-world example or tip to share?
Contribute and earn credits:
- Submit: Get $25 credit (Signal, Scan, or Solutions)
- If accepted: Get an additional $25 credit ($50 total)
- Plus: Byline credit on this article