What is a canonical URL?

A canonical URL is the address you want search engines to treat as the definitive version of a page. You declare it with a <link rel="canonical"> tag in the page's <head>, and search engines use it to decide which URL to show in results when the same content is reachable at more than one address.

Duplicates happen constantly without anyone creating them on purpose. Tracking parameters (?utm_source=newsletter), sort and filter parameters, printer-friendly views, http versus https, and www versus the bare domain can all serve the same content. Without a canonical, Google picks one itself and splits signals such as links across the variants.

How it works

Every page should carry a canonical tag, and on most pages it points at itself. This is called a self-referencing canonical. When a crawler lands on /shoes/?color=red&utm_source=ads, the tag says "the real page is /shoes/", and signals from the parameterized version are consolidated onto the clean URL.

The canonical is a strong hint, not a directive. Google weighs it alongside other signals: redirects, internal links, sitemap entries, and whether the pages are actually duplicates. If you canonicalize a page to an unrelated URL, Google will usually ignore the tag and choose its own canonical. You can see which URL Google selected in Search Console's URL Inspection tool, under "Google-selected canonical".

A canonical is also different from a redirect. The duplicate URL keeps working for visitors; only the indexing credit moves. If you want people moved too, use a 301 redirect.

Example

A post reachable at several URLs should declare one of them in every variant:

html
<link rel="canonical" href="https://example.com/pour-over-guide/" />

The same tag appears on https://example.com/pour-over-guide/?ref=twitter and on https://example.com/pour-over-guide/amp/. Use an absolute URL with the correct protocol and host. Relative URLs are allowed but are a common source of errors when a site is mirrored on a staging domain.

For syndicated content, the republished copy on the partner site points its canonical at your original article, so the original is the one that ranks.

In WordPress

WordPress core prints a canonical tag on singular posts and pages, but not on archives. SEO plugins take over the output and extend it to categories, tags, and the homepage. Hydrogen SEO outputs a self-referencing canonical on every post, page, term, and archive, server-rendered in the <head>, and lets you set a custom canonical per post in the SEO Settings sheet. The canonical URLs guide covers when overriding is worth it.

Common mistakes

  • Canonicalizing paginated pages to page 1. Page 2 of an archive has different content, so it should canonicalize to itself.
  • Pointing the canonical at a redirected or noindexed URL. This sends conflicting signals. The canonical target should return 200 and be indexable.
  • Two canonical tags on one page, usually from a theme and a plugin both printing one. Google may ignore both.
  • Mixing up the canonical and the sitemap. List only canonical URLs in your XML sitemap.

Common questions

Is a canonical tag a ranking factor?

Not directly. It tells search engines which URL should collect the ranking signals of a set of duplicates, so it protects rankings rather than adding to them.

Does Google always follow my canonical?

No. It is a hint. Google usually honors a sensible canonical but will choose a different one if your tag conflicts with redirects, internal links, or the content itself.

Should every page have a canonical tag?

Yes. A self-referencing canonical on every indexable page is the safe default and handles parameter duplicates automatically.