A canonical tag tells search engines which URL is the main version of a page when the same or very similar content is available at several URLs. It looks like a single line in the page’s head. Google uses it as a strong hint when choosing which URL to show in search results.
Key facts
- It’s an HTML link element with rel=“canonical” in the page’s head.
- It solves duplicate content from URL parameters, sorting, printing and syndication.
- Google treats it as a hint, not a strict rule.
- Every page should have one, usually pointing to itself.
- Don’t point a canonical at a redirected, broken or noindexed page.
What does a canonical tag look like?
A canonical tag sits in the head section of the page’s HTML:
<link rel="canonical" href="https://pocketsquare.io/blog/what-is-a-canonical-tag/" />
The href is the full URL you want search engines to index. Use absolute URLs, not relative ones.
Why do duplicate URLs happen?
Most sites create duplicates without meaning to. Common causes:
- Tracking parameters: the same page with ?utm_source=newsletter added.
- Sorting and filters: product lists sorted by price or colour.
- Protocol and www versions: http vs https, www vs non-www.
- Trailing slashes: /page and /page/.
- Syndication: your article republished on another site.
Without a canonical, search engines must guess which version to show, and links may be split between them.
When should you use a canonical tag?
Use one whenever the same content is reachable at more than one URL:
- On every page, as a self-referencing canonical pointing to its own clean URL.
- On parameter URLs, pointing to the version without parameters.
- On near-duplicate pages, such as printer-friendly versions.
- On syndicated copies, pointing back to your original article.
If you no longer need a duplicate URL at all, a 301 redirect is usually the better choice.
What is the difference between a canonical and a redirect?
Both consolidate signals, but they behave differently:
| Canonical tag | 301 redirect | |
|---|---|---|
| Users see | The page they opened | The new URL |
| Search engines | Usually index the canonical URL | Index the destination URL |
| Strength | Strong hint | Strong signal |
| Best for | Duplicates you need to keep (filters, tracking) | Pages that moved or were merged |
What are the most common canonical mistakes?
These errors cause most canonical problems:
- Pointing to a redirect or 404 page. Always canonicalize to a live page that returns 200.
- Canonical plus noindex on the same page, which sends mixed signals.
- Several canonical tags on one page.
- Relative URLs that resolve to the wrong address.
- Canonicalizing every page to the homepage, which tells Google to ignore your other pages.
How do you check canonical tags?
Open the page, view the source and search for “canonical”. In Google Search Console, the URL Inspection tool shows both your declared canonical and the one Google chose.
If they differ, look for conflicting signals such as internal links pointing to another version. A crawler such as those in our SEO tools pricing comparison can check canonicals across your whole site.
FAQ
What is a canonical tag?
A canonical tag is a line of HTML in a page’s head that names the preferred URL for that content. It helps search engines pick one version when the same content appears at several URLs.
Is a canonical tag a directive or a hint?
Google treats it as a strong hint, not a command. It usually follows your canonical, but it may choose another URL if other signals, such as internal links or redirects, point elsewhere.
Should every page have a self-referencing canonical?
It is good practice. A canonical that points to the page’s own URL protects it from duplicates created by tracking parameters or other URL variations.
What is the difference between a canonical tag and a 301 redirect?
A 301 redirect sends users and search engines to a different URL. A canonical tag keeps both URLs accessible but tells search engines which one to index.
Can I use a canonical tag across different domains?
Yes. Cross-domain canonicals are useful when the same article is republished on another site, so the original keeps the search credit.
