Quick answer: A canonical tag is a <link rel="canonical"> element in the page head that tells search engines which URL is the preferred version of a page. Use a self-referencing canonical on every indexable page, one per page, with a full https URL.
What is a canonical tag?
A canonical tag is an HTML link element with rel="canonical" placed in the head of a page. It names the preferred, or canonical, URL for that content. When the same page can be reached at several addresses, the tag tells search engines which one to index and show.
<link rel="canonical" href="https://www.example.com/blue-widgets/">
You will also see it called a rel canonical tag, canonical link or canonical URL. They all describe the same thing. To test one on a live page, use the canonical tag checker.
Why canonical tags matter for SEO
Search engines try to show one version of each piece of content. If the same page loads at example.com/shoes, www.example.com/shoes/ and example.com/shoes?utm_source=news, they have to guess which one is the main one. A canonical tag removes the guesswork and brings the benefit of the duplicates back to one URL:
- Avoids duplicate content problems from parameters, tracking codes, session IDs and sorting options.
- Consolidates signals such as links, so they point to a single URL.
- Keeps the preferred URL in search results instead of a messy parameter version.
- Helps with syndicated content, when another site republishes your article and points back to the original.
Google treats rel canonical as a strong hint, not a command. It can pick a different canonical if other signals disagree, so the tag works best when your redirects, internal links and sitemap all point to the same URL.
Self-referencing canonical tags
A self-referencing canonical points to the page's own URL. It is the usual default for indexable pages, because it states the preferred URL clearly even when other variants of the address appear, such as ones with tracking parameters.
<!-- on https://www.example.com/shoes/ --> <link rel="canonical" href="https://www.example.com/shoes/">
When to use a canonical tag
- URL parameters: tracking codes, filters and sorting that do not change the main content.
- Protocol and host variants: http vs https and www vs non-www, as a backup to redirects.
- Trailing slash variants of the same page.
- Product variants that share almost the same content, such as colours.
- Syndicated or republished articles, pointing to the original.
- Printer-friendly or AMP-style copies of a page.
Canonical tag vs 301 redirect vs noindex
| Method | What it does | Use it when |
|---|---|---|
| Canonical tag | Suggests the preferred URL. All versions stay reachable. | Several URLs must stay live but one should be indexed. |
| 301 redirect | Sends users and bots to the new URL permanently. | The old URL should no longer exist. |
| Noindex | Keeps the page out of search results. | The page should be reachable but never indexed. |
Canonical tag best practices
- Use absolute URLs. Write the full https address, not a relative path.
- One canonical tag per page, placed in the head.
- Point to a live, indexable page that returns 200, not to a redirect, a 404 or a noindex page.
- Avoid canonical chains. Point duplicates straight to the final URL.
- Do not combine canonical with noindex on the same page.
- Match your other signals: internal links, the XML sitemap and hreflang should reference the same canonical URL.
- Keep paginated pages self-canonical. Do not point page 2 and beyond at page 1.
- Do not use robots.txt to handle duplicates. Blocked pages cannot be read, so their canonical tag is never seen.
Common canonical tag mistakes
<!-- relative URL, easy to resolve wrongly --> <link rel="canonical" href="/shoes/"> <!-- two conflicting tags on one page --> <link rel="canonical" href="https://www.example.com/shoes/"> <link rel="canonical" href="https://www.example.com/shoes?page=2">
- Pointing every page to the homepage, which tells search engines all pages are duplicates.
- Adding the tag in the body, where it is ignored.
- Letting a theme and an SEO plugin both output a canonical.
- Pointing to a URL that redirects or returns an error.
How to add a canonical tag
In plain HTML, add the link element inside the head. Most platforms add it for you: WordPress SEO plugins such as Yoast and Rank Math output a canonical on each page, and Shopify adds one to its themes by default. Check the result rather than assuming it is right. For files such as PDFs, where there is no head, the canonical can be sent in the HTTP header as Link: <https://www.example.com/file.pdf>; rel="canonical".
How to check a canonical tag
- Run the page through the free canonical tag checker to read the tag and compare it with the page URL.
- In Google Search Console, open URL Inspection and compare the user-declared canonical with the Google-selected canonical.
- If the two differ, review redirects, internal links and your sitemap with the sitemap checker.
Canonicals are one part of technical SEO. For the full list, use the SEO audit checklist, and review your other on-page tags with the title tag checker. If your pages are not appearing at all, see why a website is not showing up on Google.
Frequently asked questions
What is a canonical tag?
A canonical tag is a link element, written as rel="canonical", in a page's head. It tells search engines which URL is the preferred version when the same or very similar content is available at more than one address.
What does rel canonical do?
Rel canonical consolidates duplicate or near-duplicate URLs so search engines can treat one as the main version. Signals such as links can then be combined, and the preferred URL is more likely to appear in search results.
Is a canonical tag good for SEO?
Yes, when used correctly. It helps prevent duplicate content problems caused by parameters, tracking codes and www or https variants. It does not replace good site structure, and Google treats it as a hint rather than a rule.
Should every page have a self-referencing canonical?
For indexable pages, a self-referencing canonical is a common best practice. It makes the preferred URL explicit, even when other URLs such as ones with tracking parameters point to the same content.
What is the difference between a canonical tag and a 301 redirect?
A 301 redirect sends visitors and search engines to a new URL, so the old URL stops being shown. A canonical tag leaves every URL reachable and only suggests which version search engines should index.
Can I use a canonical tag together with noindex?
It is best not to. A canonical tag says to treat the page as a copy of another URL, while noindex says to keep the page out of search. Mixed signals can lead to unexpected results, so pick one.
How do I check a canonical tag?
View the page source and search for rel="canonical", use the URL Inspection tool in Google Search Console, or run the page through the SEOGlint canonical tag checker.
Does Google always follow the canonical tag?
No. Google treats it as a strong hint and may select a different canonical if redirects, internal links, sitemaps or content suggest another version.