What a canonical does
A canonical tag (<link rel="canonical" href="…">) tells search engines which URL is the authoritative version of a page. Search engines use it to consolidate duplicate or near-duplicate content under a single URL.
Without a canonical, search engines encounter the same problem: if your page is reachable at multiple URLs — with and without trailing slashes, with and without query parameters, over HTTP and HTTPS — they have to decide on their own which version to index and rank. The choice is not always the version you would pick.
A canonical doesn't prevent pages from being accessible. It just tells search engines which URL to treat as the real one.
Run the free Meta Tag Analyzer to see every tag, its length verdict, and exactly what to fix.
Self-referencing canonicals
The most common pattern is a self-referencing canonical: every page includes a canonical tag pointing to its own URL.
<link rel="canonical" href="https://yourdomain.com/the-page/" />This works because it removes ambiguity. Even if the page can be reached at multiple URLs, the canonical tells search engines exactly which one to index. It also prevents query parameters added by analytics tools or ad campaigns from being indexed as separate pages.
Three requirements for a correct self-referencing canonical:
- Absolute URL — must include the protocol and domain (
https://yourdomain.com/…). A relative path is not valid. - Returns 200 — the URL in the canonical must be a live page that returns an HTTP 200 status. Canonicalising to a 301 redirect or a 404 is a mistake; search engines may ignore the tag.
- Exactly one per page — if a page has multiple
<link rel="canonical">tags, search engines ignore all of them and make their own choice.
Common mistakes
Canonicalising to a non-200 URL. If the URL in the canonical tag redirects (301) or returns an error (404, 410), search engines treat the tag as invalid. Always check that the canonical URL is live and returns 200 before deploying.
Mismatch with the sitemap. Your XML sitemap should list canonical URLs. If the URLs in your sitemap differ from the canonical tags on the pages themselves — for example, one uses a trailing slash and the other doesn't — you are sending contradictory signals. Keep them consistent.
Multiple canonical tags on one page. Some CMS platforms, theme layers, and SEO plugins each add their own canonical tag. The result is a page with two or three <link rel="canonical"> tags pointing to different URLs. Search engines ignore all of them. Check the rendered HTML, not just your template, to confirm only one canonical tag appears.
Relative canonical paths. A canonical tag like <link rel="canonical" href="/the-page/"> is not valid. The href must be absolute.
Canonical pointing to a different domain. Cross-domain canonicals are valid in specific situations — syndicating content, for example — but they tell search engines to attribute the content to the other domain. This is rarely what you want for your own pages.
Checking canonicals at scale
For individual pages, paste the URL into the Meta Tag Analyzer. It reads the rendered HTML and shows you the canonical tag exactly as search engines see it — including whether there are multiple tags, whether the URL is absolute, and whether the protocol matches.
For a site with many pages, the consistent issues to check are:
- Pagination pages that should canonicalise to themselves (not to page 1)
- Faceted navigation URLs (filtered and sorted product listings) that should canonicalise to the clean URL
- URLs with tracking parameters that should canonicalise to the base URL
See canonical URL missing for a fix checklist if no canonical tag is present.