Canonical Tag
A canonical tag (rel=”canonical”) is a line of HTML in a page’s head that tells search engines which URL is the main version of a piece of content. It helps Google choose one URL to index and rank when the same or very similar content is available at several addresses.
What a canonical tag looks like
The tag sits in the head section of the page:
- link rel=”canonical” href=”https://www.yourdomain.co.uk/blue-widgets/”
Every version of the page points to the same preferred URL, and the preferred URL points to itself (a self-referencing canonical).
Why canonical tags are needed
Websites create duplicate URLs far more often than their owners realise:
- Tracking parameters, such as ?utm_source=newsletter.
- Filters and sorting, such as ?colour=blue&sort=price (Faceted Navigation).
- Protocol and subdomain versions: http vs https, www vs non-www.
- Trailing slashes and capital letters in URLs.
- Products listed in several categories with different paths.
- Printer-friendly or AMP versions of pages.
- Syndicated content republished on other websites.
Without guidance, Google picks a canonical itself, which may not be the URL you want. Ranking signals such as links may also be split across versions (see Duplicate Content).
Canonical tags vs other options
- 301 redirects are better when users never need the duplicate URL, for example old pages or http to https. A redirect is a strong instruction; a canonical is a hint.
- Noindex removes a page from the index but does not consolidate signals to another URL.
- Canonical tags are best when the duplicate must stay accessible to users, such as filtered or tracked URLs.
Canonical tags are hints, not commands
Google may ignore your canonical if other signals disagree. For example, if your sitemap, internal links and redirects all point to a different version, Google might choose that one instead. In Google Search Console, the URL Inspection tool shows both the “user-declared canonical” and the “Google-selected canonical”. When they differ, investigate.
Common canonical mistakes
- Pointing every page to the homepage, which can remove pages from the index.
- Canonicalising paginated pages to page 1, hiding products or articles on later pages (see Pagination).
- Using relative URLs incorrectly, creating broken canonicals.
- Multiple canonical tags on one page, often from a theme and a plugin, which makes Google ignore both.
- Canonical pointing to a redirected, noindexed or 404 URL.
- Mixed signals: canonical to one URL while internal links and the sitemap use another.
- Canonicals added by JavaScript that differ from the raw HTML.
Best practices
- Add a self-referencing canonical to every indexable page.
- Use absolute URLs including https and your preferred domain.
- Keep internal links, sitemaps and canonicals consistent.
- Use one canonical tag per page.
- For syndicated articles, ask partners to add a cross-domain canonical pointing to your original.
- For very similar but distinct pages, such as product variants that people search for separately, consider whether they deserve their own canonical and unique content.
Most SEO plugins, including Rank Math and Yoast on WordPress, add canonical tags automatically. Check them after installing new themes or plugins, and during any Website Migration.
Further reading: Google on consolidating duplicate URLs.
Key Takeaways
- A canonical tag tells Google which URL is the main version of a page.
- Add a self-referencing canonical to every indexable page.
- Use redirects instead when the duplicate URL is not needed by users.
- Canonicals are hints; keep links, sitemaps and redirects consistent with them.
- Never canonicalise paginated pages to page one.
Related Terms
Wondering what to fix first on your site? Get a free check of your site’s SEO, or keep learning in the SEO Encyclopedia.