
A canonical tag (<link rel="canonical">) tells search engines which URL is the main version of a page when the same or very similar content is reachable at several addresses. Google then concentrates ranking signals on that URL and shows it in results. Also, every indexable page should carry a self-referencing canonical with its full, preferred URL. Canonicals are a strong hint, not a command, so they only work when your redirects, internal links and sitemap all agree with them. In addition, this guide explains when duplicates happen, how to set canonicals correctly and the mistakes that cause pages to drop out of Google.
- Use absolute URLs:
https://www.example.com/page, not/page. - Give every indexable page a self-referencing canonical.
- Do not canonical paginated pages (page 2, 3) to page 1, or filtered pages you want indexed to the category.
- Check Google's chosen canonical with the URL Inspection tool in Search Console.
Canonical tag: why duplicate URLs happen
In fact, most sites create duplicates without anyone noticing:
- Protocol and host:
http://,https://,wwwand non-wwwversions. - Tracking parameters:
?utm_source=facebook,?fbclid=...,?gclid=.... - Sorting and filters:
?orderby=price,?color=redon category pages. - Trailing slashes and case:
/aboutand/about/,/Shopand/shop. - Products in several categories:
/men/shoes/runnerand/sale/runner. - Print, AMP or session-ID versions of the same article.
Duplicates split links and signals between URLs and waste crawling. Google picks one version anyway; a canonical tag lets you choose which.
How to write a canonical tag
Place it in the <head> of the page:
<link rel="canonical" href="https://www.example.com/services/web-design" />
Also, for files that have no HTML head, such as PDFs, send it as an HTTP header:
Link: <https://www.example.com/brochure.pdf>; rel="canonical"
Rules that matter:
- Also, only one canonical per page. If a theme and a plugin both print one, Google may ignore both.
- The canonical URL must return 200, not a redirect or 404, and must not be noindexed.
- It must be in the raw HTML head, not added late by JavaScript if you can avoid it.
Canonical tag: canonical vs 301 redirect vs noindex
| Tool | Visitors see | Use when |
|---|---|---|
| 301 redirect | Only the new URL | The old URL should not exist any more (see our redirects guide) |
| Canonical | Both URLs still work | Duplicates must stay accessible, such as tracking or filter URLs |
| Noindex | The page works | The page should not appear in search at all, such as internal search results |
Canonical tag: pagination, filters and stores
- Paginated pages (
/blog/page/2) should canonical to themselves, because they list different items. Google no longer usesrel="next"andrel="prev". - Sort orders (
?orderby=price) should canonical to the unsorted category. - Filters you want to rank, such as "black lawn suits", work better as real category or landing pages with their own canonical, content and internal links.
- Products in several categories should use one canonical product URL. WooCommerce does this by default with
/product/slug.
Canonical tag: cross-domain canonicals
If you republish your article on Medium, LinkedIn or a partner site, ask them to add a canonical pointing back to your original. Google may still choose differently, so publish on your own site first and let it get indexed.
Canonicals in WordPress and Shopify
- WordPress: core outputs a canonical on single posts and pages. Yoast SEO, Rank Math and SEOPress extend it to archives and let you override it per post in the Advanced settings.
- Shopify: themes include
{{ canonical_url }}automatically. Collection-aware product URLs (/collections/x/products/y) canonical to/products/y. - Override a canonical only when you are sure; a wrong manual canonical can remove a page from Google.
How to check canonicals
- View the page source and search for
rel="canonical". - In Search Console, use URL Inspection. It shows the "User-declared canonical" and the "Google-selected canonical". If they differ, Google disagrees with your signals.
- Check the Pages report for "Duplicate without user-selected canonical" and "Duplicate, Google chose different canonical than user".
- Crawl the site with Screaming Frog or Sitebulb to find missing, multiple or non-200 canonicals.
Common canonical mistakes
- Every page canonicalised to the home page by a broken theme setting.
- Canonicals pointing to
http://after moving to HTTPS. - Staging domains left in canonicals after launch.
- Relative URLs that resolve wrongly on some paths.
- Sitemaps listing URLs that canonical somewhere else. List only canonical URLs in your sitemap.
- Internal links pointing at non-canonical versions, such as with tracking parameters.
Frequently asked questions
Why did Google choose a different canonical?
In addition, other signals disagreed: internal links, redirects, sitemap entries or content differences. Then make all of them point at the URL you want.
Do I need a canonical if I have no duplicates?
Yes. A self-referencing canonical protects against parameter and tracking-link duplicates you cannot control.
Do canonicals pass link value?
In addition, when Google accepts the canonical, signals from the duplicates are consolidated onto it.
Canonical tag in short
Here is the short version. A canonical tag tells Google which page is the main one. Every page should point to itself. Use the full URL with https. Do not point page two at page one. Keep your links, sitemap and redirects in line with it. Then check the result in Search Console. If Google picks a different page, fix the other signals first.
Related guides: Why Website Speed Matters and How to Make Your Site Faster, How to Get Your Website on Google and Lazy Loading Images.
For official guidance, see Google Search Central.
Want a technical SEO audit?
Our SEO team finds duplicate content, canonical errors and indexing problems, and fixes them at the template level. Contact us for a free check.
Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.
Ask a Question on WhatsApp