The canonical tag is an HTML link element that tells search engines the preferred (canonical) URL of a page. It helps consolidate duplicate or similar URLs onto a main version.
The is a link element in a page's <head>. It shows search engines which URL should be treated as the preferred main version of a piece of content.
It is especially useful when the same content is reachable under several URLs, for example through parameters, sorting, filters or product variants. For Google the canonical is a strong signal but not an absolute command: Google may choose a different URL if other signals contradict it.
Best practices: use an absolute URL, point to a reachable 200 page, do not point to or 404, output only one canonical per page, and avoid canonical chains. For important pages a self-referencing canonical is best practice. , and should consistently support the same canonical URL.