Canonical URLs
A canonical URL tells search engines which version of a page is the "master" or preferred version. It is the primary way to handle duplicate content issues — when the same (or very similar) content appears at multiple URLs.
Why Duplicate Content Is a Problem
Duplicate content occurs when the same content appears at multiple URLs. Common causes include:
- HTTP and HTTPS versions of the same page
- URLs with and without trailing slashes (
/pagevs/page/) - www and non-www versions (
www.example.co.ukvsexample.co.uk) - URL parameters used for tracking or filtering (
/products?sort=price) - Printer-friendly or mobile versions of pages
When Google finds duplicate content, it must choose which version to index and rank. It may choose the wrong one, split ranking signals between versions, or simply rank your pages lower overall.
How the Canonical Tag Works
Add this tag to the <head> of every page, pointing to the preferred URL:
<link rel="canonical" href="https://your-domain.com/example-page/" />This tells Google: "Even if you find this content at other URLs, the one in the canonical tag is the version I want ranked."
Self-Referencing Canonicals
Every page should have a canonical tag pointing to itself — even if there is no known duplicate. This prevents search engines from creating their own canonical interpretation and protects against future duplicate issues.
How to Fix Missing or Incorrect Canonicals
Manually add canonical tags to each page's <head>. In WordPress, Yoast SEO and Rank Math add them automatically. After migrating from HTTP to HTTPS, update all canonical tags to use https://.