What is a canonical tag?
A canonical tag tells search engines which URL is the main version of a page when several URLs show the same or very similar content.
Updated
A canonical tag is a rel="canonical" link in a page’s HTML head (or an HTTP header) that names the preferred URL for content that exists at several addresses. It tells Google which version to index and show, and to combine signals from the duplicates into that one URL.
What does a canonical tag look like?
<link rel="canonical" href="https://shop.example/shoes/trail-runner-2" />Is the canonical tag a command?
No. Google treats it as a strong signal, alongside others such as redirects (strong) and sitemap inclusion (weak), and makes the final choice itself. If your signals disagree, for example the canonical points to one URL while internal links and the sitemap use another, Google may pick a different canonical. Search Console then reports Duplicate, Google chose different canonical than user.
When do you need one?
- Tracking and sorting parameters:
?utm_source=…,?sort=price. - The same product in several categories, with a different path in each.
- HTTP and HTTPS, or www and non-www, both answering.
- Syndicated copies of your articles on other sites.
Best practices
- Use absolute URLs, and add a self-referencing canonical on the main page.
- Point to a page that returns 200, is indexable, and is in your sitemap.
- Don’t use noindex or robots.txt to pick a canonical.
- Use the HTML tag or the HTTP header, not both.
When a duplicate correctly points elsewhere, Search Console lists it as Alternate page with proper canonical tag, which is expected.