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.
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
Canonical tag checker
Check rel=canonical for missing tags, www/https mismatches, and paths that do not match the live URL.
Open tool →Meta tag & social preview checker
See your Google, X, LinkedIn, and Slack previews and fix titles, descriptions, and OG images.
Open tool →Free website checker
Paste a public URL for one report from server HTML plus Google PageSpeed. Use the extension for localhost, JS-heavy apps, and the full audit.
Open tool →More guides
XML sitemap guide: what to include, what to skip, and how to submit it
How sitemap.xml helps Google and Bing find your pages, which URLs belong in it, lastmod honesty, and how to submit it in Search Console.
Read · 8 min →Website not indexing in Google: a practical troubleshooting checklist
Why new or updated pages stay out of Google, how to read Search Console statuses, and which on-page fixes to try first.
Read · 9 min →Security headers explained: HSTS, CSP, and the six that matter at launch
What HSTS, Content-Security-Policy, X-Frame-Options, and related headers do, which ones to ship first, and how to check them on a live URL.
Read · 8 min →