Your page is live. Google is showing a different URL for it.
Or the same product page exists on five URLs, and none of them rank properly.
This is a duplicate content problem, and the canonical tag is the most common tool for fixing it. It is also one of the most misused tags in SEO. Here is how I use it, step by step.
What a canonical tag actually is
A canonical tag is a line of HTML in the head of a page. It tells search engines which URL is the “main” version when the same or very similar content is available on more than one URL.
It looks like this:
<link rel=”canonical” href=”https://www.example.com/shoes/running-shoes/” />
(That is an example URL, not a real site.)
Two things to understand before anything else:
- It is a hint, not a command. Google can ignore it if other signals (internal links, sitemap, redirects) point somewhere else.
- It consolidates signals. Links and ranking signals from duplicate URLs can be grouped under the one you choose, so you are not splitting strength across copies.
Jargon check: “canonicalisation” just means choosing the one preferred URL out of several that show the same content.
When to use a canonical tag
Use it when the same content genuinely lives on multiple URLs and you still need those URLs to work for users. If users do not need the duplicate at all, a redirect is usually better (more on that below).
| Situation | Example (illustrative) | Canonical points to |
|---|---|---|
| Tracking parameters | /product/?utm_source=newsletter | /product/ |
| Sorting or filter parameters | /shoes/?sort=price-low | /shoes/ (if the filtered page adds no unique search value) |
| HTTP vs HTTPS, www vs non-www | http://example.com/page/ | The one https version you chose (and redirect the rest) |
| Trailing slash variants | /page and /page/ | Your preferred format |
| Same product in multiple categories | /men/shirt-1/ and /sale/shirt-1/ | One main product URL |
| Syndicated or republished content | Your article republished on a partner site | The original on your site (partner adds the tag) |
| Printer-friendly or AMP-style copies | /page/print/ | /page/ |
Also add a self-referencing canonical on every indexable page. That means the page’s canonical points to its own clean URL. It is a cheap safety net: if someone links to your page with a random parameter, Google still knows the clean version is the one you want.
When NOT to use it
- When the content is genuinely different. Two different products with similar templates are not duplicates. Do not canonical one to the other.
- When you want a page removed from Google. Use noindex for that. A canonical says “prefer that other page”, not “delete this”.
- When an old URL should disappear for users too. Use a 301 redirect.
- As a fix for pagination. Page 2 of a category is not a duplicate of page 1. Give each paginated page a self-referencing canonical.
How to add a canonical tag (exact steps)
Method 1: In the HTML head
- Decide the preferred URL: https, your chosen www or non-www, consistent trailing slash, no parameters.
- Open the template or page head section.
- Add one tag inside the head:
<head>
<link rel=”canonical” href=”https://www.example.com/blog/canonical-tags/” />
</head>
- Use the full absolute URL, including https and the domain.
- Publish, then view the page source (Ctrl+U) and search for “canonical” to confirm it is there.
Method 2: In WordPress
Most SEO plugins (Yoast, Rank Math, others) add a self-referencing canonical automatically. To override on a single page, open the post, scroll to the plugin’s Advanced section, and paste the canonical URL in the canonical field. Only do this when you have a reason. Do not touch it on every page “just in case”.
Method 3: HTTP header (for PDFs and non-HTML files)
A PDF has no head section, so you send the canonical in the server response instead:
Link: <https://www.example.com/guides/seo-guide/>; rel=”canonical”
This is set at server level (Apache, Nginx or your CDN), so you will usually need a developer for it. Hand them the exact line above and the list of PDF URLs.
The rules I follow every time
- One canonical per page. Two conflicting tags and Google may ignore both.
- It must be in the head, not the body. A tag in the wrong place is ignored.
- Absolute URLs only. Relative paths like href=”/page/” are a common source of bugs.
- Canonical to a page that returns 200. Not a 404, not a redirect, not a noindex page. Check with the HTTP Status Checker.
- Keep signals consistent. Your internal links, XML sitemap and canonical should all use the same URL.
- Do not block the duplicate in robots.txt. If Google cannot crawl the page, it cannot see the canonical tag on it. Test with the Robots.txt Checker.
Canonical tag vs 301 redirect vs noindex vs robots.txt
Freshers often treat these as interchangeable. They are not.
| Tool | What it does | Use it when |
|---|---|---|
| Canonical tag | Suggests the preferred URL, both URLs stay accessible | Duplicates must exist for users (filters, tracking, variants) |
| 301 redirect | Sends users and bots to the new URL | The old URL has no reason to exist |
| Noindex | Keeps the page out of search results | Page is useful to users but should not rank (thank-you pages, internal search) |
| Robots.txt | Stops crawling, not necessarily indexing | You want to save crawl effort on low-value sections |
If you are unsure whether a redirect is set up correctly, run the URL through the Redirect Checker before blaming the canonical tag.
A mistake I see freshers make
They canonical everything to the homepage, or they canonical page 2, 3, 4 of a category back to page 1, because “it looks like duplicate content”.
It is not a duplicate. Page 2 lists different products. When you canonical it to page 1, you are telling Google to ignore those products’ listing page, and those products can become harder to discover.
On a client site I audited, the pattern was a template-level canonical rule that applied the same tag to a whole section. Nobody noticed because the pages “looked fine”. The fix was a single template change, but finding it took a proper crawl and page-by-page checks. That is why I tell juniors to check canonicals at template level, not just on one page.
More of these in my post on SEO mistakes beginners make in their first job.
How to check canonicals in Google Search Console
Check one URL
- Open Google Search Console and select your property.
- Paste the URL in the search bar at the top (this opens URL Inspection).
- Under the “Page indexing” section, find User-declared canonical and Google-selected canonical.
- If they match, good. If they differ, Google disagrees with you. Look at your internal links, redirects and sitemap for the conflicting signal.
Check at scale
- Go to Indexing > Pages.
- Scroll to “Why pages aren’t indexed”.
- Look for these three statuses:
- Alternate page with proper canonical tag: usually fine. Google respected your tag.
- Duplicate without user-selected canonical: you have not told Google which one you prefer. Add a canonical.
- Duplicate, Google chose different canonical than user: your hint was overridden. Investigate.
Click a status, open an example URL and run URL Inspection on it. Do not mass-edit anything before you know the pattern.
If you want to go deeper on how Googlebot actually spends its time on duplicate URLs, the Log File Analyzer helps you see whether parameter URLs are eating up crawl activity.
Copy-paste canonical audit checklist
- Does every indexable page have exactly one canonical tag?
- Is the tag inside the head section?
- Is the URL absolute, with https and the correct host?
- Does the canonical URL return a 200 status?
- Is the canonical URL indexable (no noindex, not blocked in robots.txt)?
- Do paginated pages canonical to themselves, not page 1?
- Are parameter URLs (utm, sort, session IDs) pointing to the clean version?
- Do internal links and the XML sitemap use the canonical URL?
- Does the canonical match across the mobile and desktop versions, if they are separate?
- In Search Console, does Google-selected canonical match your user-declared canonical on key pages?
Quick test to score yourself: pick your five most important pages and run all ten checks. If you can’t answer a question, that is your homework for the week.
What to do next
Pick one site, your own blog or a practice site, and run the checklist above on five URLs. Note what you find. That alone is a good portfolio exercise.
To see where canonicals fit in a full audit, read my SEO process framework. If you get stuck on a real canonical problem, bring it to the free WhatsApp community, or write to hello@pranavsolanki.digital.



