What is a Canonical URL?
<link rel="canonical" href="https://example.com/products/mug" />
One page, many addresses.
Tracking parameters
?utm_source=newsletter or ?fbclid=… give the same page another URL.
www and non-www
Both hostnames can serve the same content.
HTTP and HTTPS
Two versions of every URL if the old one isn't redirected.
Trailing slashes
/page and /page/ can be treated as different URLs.
Sorting and filters
?sort=price and ?sort=name produce near-identical pages.
Print and mobile versions
Alternate copies of the same article.
Tell search engines which one to use.
Add a canonical link
Put a <link rel="canonical"> in the head of every version, pointing at the preferred one.
Use the full address
Write an absolute URL, with protocol and host, not a relative path.
Redirect when you can
A 301 redirect is stronger than a canonical hint, and is right when the duplicate shouldn't exist at all.
A canonical is a hint, not a command.
Search engines treat the canonical as a strong signal, but may choose another URL if the pages differ or the tag contradicts other signals. A canonical that points at a different page, a chain of canonicals, or a canonical combined with noindex all cause confusion.
Common questions
Should every page have a canonical tag? +
Pointing a page at itself is fine and common. It protects the page from versions created by parameters.
What is the difference between a canonical and a 301 redirect? +
A redirect sends visitors to the other URL. A canonical keeps both reachable and only tells search engines which one to index.
How do UTM parameters relate to canonicals? +
A tagged URL is a duplicate of the clean one. A canonical pointing at the clean URL tells search engines they are the same page.
How do I see a page's canonical? +
The meta tag checker reads it, together with the title, description and robots directives.