What is a canonical tag?
A canonical tag is a line in a page’s HTML that states which URL is the preferred version when the same or nearly the same content exists on several URLs. Search engines use that preference to decide which URL to show. For Google, a canonical tag is a hint rather than a binding command.
Why is a canonical tag important?
- Prevents duplicate content: you tell search engines which version counts.
- Consolidates signals: links and value end up with a single URL.
- Clean search results: the right URL is shown.
Examples of a canonical tag
- A store with filter URLs such as
/shoes?color=redpointing to/shoes. - The same page reachable through
http,https, with and withoutwww. - An article that also appears on another site and points to the original.
- The tag itself:
<link rel="canonical" href="https://www.example.com/shoes/">
How do you use a canonical tag?
Add a canonical tag to every page in the <head>, pointing to the page itself for unique pages. For duplicate variants, point to the preferred URL and always use the full URL. Do not combine the tag with conflicting signals such as noindex. A crawl reveals mistakes, as it does in technical SEO.