Search engines want one URL per piece of content. Websites, left alone, produce several — usually by accident. A canonical tag is how you say "several addresses reach this content; this one is the real one".
Nobody sets out to publish the same page four times. It happens structurally:
https://example.com/product
https://example.com/product/
http://example.com/product
https://www.example.com/product
https://example.com/product?ref=newsletter
https://example.com/product?colour=blueTo a person these are obviously the same page. To a search engine they are six distinct addresses that happen to return identical content — and it has to decide which to index and which to ignore.
Two consequences, both quiet:
www version and others to the non-www, the value is divided between two addresses instead of accumulating on one.<head>
<link rel="canonical" href="https://example.com/product">
</head>Placed in the <head> of every variant, this says: whatever address you reached this by, treat https://example.com/product as the one that counts. Signals consolidate there, and that is the version shown in results.
Self-referencing canonicals
A page should carry a canonical tag pointing at itself when it is the canonical version. This is normal and correct — a self-referencing canonical removes ambiguity when the page is reached through a tracking parameter or an alternative path.
noindex removes a page from results entirely.| Situation | Right tool |
|---|---|
| Same content at several URLs | rel="canonical" |
| Page permanently moved | 301 redirect |
| Page should not be in results at all | noindex meta tag |
| Same content in several languages | hreflang, plus canonical per language |
A site serving the same content in more than one language — as this site does in English and Bengali — uses hreflang to tell engines the pages are translations of one another rather than duplicates, so the right language version is shown to the right person.