Technical

Canonical URL

Canonical URL is the address you tell search engines to treat as the master copy when several URLs return the same or near-identical content. You declare it with a `<link rel='canonical'>` tag or a `Link` header.

How it is measured

View source and find the canonical `<link>` in the head, or run `curl -I` and read the `Link:` header, which is the only option for PDFs. Search Console's URL Inspection shows the canonical you declared beside the one Google actually chose.

Crawl the site and compare each page's canonical to its own URL. A page pointing at itself is normal. A page pointing elsewhere should be on purpose, and the target must return 200, not a redirect.

Worked example

A bike shop's WordPress category page is reachable as `/frames/`, `/frames/?orderby=price`, and `/frames/page/1/`. All three declare `https://velobay.example/frames/` as canonical. Search Console reports 14 URL variants folded into one.

Then a plugin update writes the canonical as `http://` instead of `https://`. The tag now points at a URL that 301s back, Google ignores it, and it picks the parameter version by itself. Fixing the scheme restores the grouping within a recrawl or two.

How it differs

A canonical URL is a hint: index this one. An HTTP 301 is an instruction: go there instead. The canonical leaves every variant reachable by visitors, while the redirect removes them. Google may overrule a canonical, but it follows a 301.

Common errors

Pointing every page's canonical at the homepage. Naming a target that redirects or returns 404. Using a relative href with the wrong base. Putting the tag in the body, where it is ignored. Combining a canonical with noindex on the same page. Pointing every paginated page at page 1.

In practice

Crawl your site, export the canonical column, and filter for rows where it differs from the URL. Match scheme, host, and trailing slash to whatever your 301s produce, and emit exactly one tag per page. List the canonical in the sitemap, not the variants.

See also

HTTP 301, Sitemap

Sources

Count this on a real site.

Watch my website