Canonical tags explained for beginners
What canonical tags are, when you need them, how Google treats them, and how to avoid the canonical mistakes that quietly keep pages out of search.
A canonical tag is a line in a page's HTML that tells search engines which URL is the main version of that content. It looks like this: <link rel="canonical" href="https://example.com/page">. Canonicals help when the same or very similar content is available at more than one URL.
Why duplicate URLs happen
- http vs. https, and www vs. non-www versions of the same page
- Tracking parameters (?utm_source=...) and sort or filter parameters
- The same product in several categories on an online store
- Printer-friendly or session-based URLs
- Content syndicated or republished on other sites
What canonicals do
The canonical tells Google your preferred URL, so signals like links are consolidated there and the right version appears in results. Google treats it as a strong hint, not a command. It weighs the canonical alongside redirects, internal links and sitemap entries when choosing which URL to index.
Self-referencing canonicals
It's good practice for each normal page to include a canonical pointing to itself. This guards against parameter versions being indexed instead of the clean URL. Most modern platforms and SEO plugins add these automatically.
Common canonical mistakes
- Every page canonicalised to the homepage, which effectively asks Google to ignore them
- Canonical pointing to a URL that redirects, 404s or is noindexed
- Canonical in conflict with the sitemap or internal links
- Using canonicals between pages that aren't actually duplicates
- Multiple canonical tags on one page, often from two plugins
Canonical vs. redirect vs. noindex
- Redirect (301): the old URL should never be used, so send people and bots to the new one
- Canonical: both URLs need to exist for users, but only one should be indexed
- Noindex: the page shouldn't appear in search at all
How to check your canonicals
View a page's source and search for "canonical". Check that there's exactly one canonical tag and that it points to the correct URL. In Search Console, URL Inspection shows the "user-declared canonical" and the "Google-selected canonical". If they differ on important pages, that's worth investigating.
Example: canonical tag code
Put the tag in the <head> of the page. A filtered product URL pointing to the clean version looks like this:
- Use the full URL, including https://
- Point only to a page that returns 200 and isn't set to noindex
- Use one canonical tag per page
<!-- On https://example.com/shoes?color=blue -->
<link rel="canonical" href="https://example.com/shoes" />
<!-- On https://example.com/shoes (self-referencing) -->
<link rel="canonical" href="https://example.com/shoes" />Frequently asked questions
Is a canonical tag required on every page?
Not strictly, but self-referencing canonicals are a sensible default.
Will Google always follow my canonical?
No. It's a strong hint that Google can override if other signals disagree.
Can canonicals point to another domain?
Yes, cross-domain canonicals are supported, for example for syndicated content.
Should paginated pages canonical to page one?
Generally no. Each page in a series should usually canonical to itself.
Do canonicals pass ranking signals?
They help consolidate signals onto the preferred URL when Google respects them.
