Canonical tags explained: stop duplicate URLs from splitting your rankings

What rel=canonical does, when it should point to itself, www/https pitfalls, and how to check a live page.

By Sumit JhaUpdated October 17, 20268 min readFor: Developers, freelancers, and SEO beginners

Short answer

A canonical tag tells search engines which URL is the preferred version of a page when duplicates exist. On unique pages, point canonical at itself with the final https host you want to rank. Use one consistent host (www or not), avoid http canonicals on https sites, and verify with a canonical checker after deploy.

Run the free canonical tag checker on your live URL, then fix host mismatches with a redirect check.

What a canonical is

Search engines often see the same page at multiple addresses: with and without www, http and https, tracking parameters, or trailing slashes. The canonical tag names the URL you want to rank. It is a strong hint, not a guarantee.

Self-referencing vs consolidating

For a unique page that should rank on its own URL, the canonical should match that URL (self-referencing). Point to another URL only when you intentionally consolidate duplicates onto a primary page.

www, https, and trailing slashes

  • Pick one host (www or apex) and redirect the other with 301/308.
  • Use https in the canonical whenever the live site is https.
  • Be consistent with trailing slashes across redirects, sitemap, and canonicals.

Common mistakes

  • Missing canonical on launch pages.
  • Canonical still on staging or a preview host.
  • og:url pointing at a different URL than the canonical.
  • Every page canonicalizing to the home page (accidental sitewide tag).

How to verify

After deploy, open the canonical checker, then confirm the sitemap and Search Console setup in the GSC guide and XML sitemap guide.

Questions

Where does the canonical tag go?

In the HTML <head> of every indexable page: <link rel="canonical" href="https://example.com/page"> with an absolute https URL.

Can I use a relative canonical?

Browsers and engines resolve relative URLs, but absolute https URLs are clearer and less error-prone. Prefer absolute.

Do canonicals replace redirects?

No. If you permanently moved a URL, use a 301/308 redirect. Canonicals help when several live URLs still return 200 with similar content.

How do I check mine?

Use view-source or the free Shipcheck canonical checker on the live URL after deploy.

Tools for this guide