What is a canonical URL?
A canonical URL tells search engines which version of a page is the "official" one when multiple URLs serve similar or identical content. It prevents duplicate content issues that dilute ranking signals. Implementation: add <link rel="canonical" href="https://example.com/page"> to the <head> of every page. The canonical URL should be the absolute, preferred version of the page. When you need canonicals: 1) HTTP vs HTTPS — canonical to HTTPS. 2) www vs non-www — canonical to whichever you prefer. 3) Trailing slash vs no trailing slash — pick one, canonical to it. 4) URL parameters — /products?sort=price should canonical to /products. 5) Mobile vs desktop URLs — if separate URLs, canonical to the responsive/desktop version. 6) Pagination — page 2, 3, etc. may canonical to page 1 OR self-reference depending on content uniqueness. 7) Syndicated content — if your article appears on another site, ask them to add a canonical pointing to your original. Common mistakes: canonical pointing to a 404 page, canonical pointing to a redirected URL, different page canonicalizing to each other (circular), and using relative URLs instead of absolute URLs. Self-referencing canonicals are best practice — every page should have a canonical tag pointing to itself, even if there are no duplicates.