A canonical tag (rel="canonical") tells search engines which version of a page is the “master” copy when multiple URLs show the same or very similar content. It’s placed in the <head> of a page’s HTML and points to the preferred URL.
Why this matters: Many sites unintentionally create duplicate content — the same product page accessible via /product?color=red and /product?color=blue, or a page reachable both with and without a trailing slash. Without a canonical tag, search engines have to guess which version to index and rank, which can split ranking signals across duplicates instead of consolidating them into one strong page.
Common use cases: E-commerce filter/sort URL parameters, print-friendly page versions, syndicated content republished on partner sites, and www vs. non-www or HTTP vs. HTTPS variants.
Common mistakes: Pointing a canonical tag to a page that then redirects elsewhere (creates a loop), setting canonicals to a completely unrelated page, or having conflicting signals — like a canonical tag pointing to Page A while the sitemap lists Page B as the primary URL.
Self-referencing canonicals — where a page’s canonical tag simply points to itself — are considered good practice on most pages, even when there’s no duplicate, since it removes any ambiguity.
