Canonical Tag
Tells a search engine which URL is the preferred version when the same content appears at multiple addresses.
If you set a canonical tag without reviewing your internal links and sitemap, you may consolidate signals onto a URL that Google ignores.
Key points
- Use absolute URLs in the canonical href, never relative paths.
- Place only one canonical tag per page in the HTML
<head>. - Make the canonical tag self-referential on your preferred URL.
- Ensure the canonical URL matches the URL used in sitemaps, hreflang tags, and 301 redirects to avoid conflicting signals.
- Do not rely on canonicals to fix thin or duplicate content issues.
Consolidating product page variants
An online store sold the same product at /shoes and /shoes?colour=red. Both pages showed identical content. After adding a canonical tag pointing to the clean URL, Google reindexed the preferred version. Within six weeks, the product page climbed from position 9 to position 4 in search results, and organic traffic to that URL nearly doubled.
Three common canonical mistakes
- Relative URLs in the href A relative path like '/page' can be misinterpreted by search engines. Always write the full protocol and domain.
- Multiple canonicals on one page If a page contains two or more rel=canonical tags, search engines may ignore all of them. Use a single, decisive canonical declaration.
- Cross-language canonicalisation Pointing the canonical of an English page to a French version can cause indexing confusion. Canonical should only apply within the same language set.
Four ways a canonical tag can be ignored
- Conflicting internal signals If your internal links and sitemap point to a different URL than the canonical, Google may overrule your tag. Consistency across signals matters.
- Pages too dissimilar When the canonical points to a page with substantially different content, search engines treat it as a hint and may select a different URL.
- Mixed with a 301 redirect A 301 redirect to one URL plus a canonical tag to another URL is contradictory. Search engines usually follow the redirect and ignore the tag.
- Robots.txt blocking the canonical If the canonical URL is disallowed in robots.txt, search engines cannot crawl it to verify the relationship, and the tag loses effect.
When to use a self-referential canonical
- Single unique page Every page should declare its own canonical URL, even if it is the same page. This prevents confusion when tracking parameters or session IDs are added.
- Paginated series For page 2 of a category, the canonical should point to itself, not to page 1. Only the first page should canonical to the series start.
- Syndicated content When your content appears on another site, set your original page as the canonical. Avoid using a canonical on a syndicated copy that points back to you.
Common questions
How do I use a canonical tag in SEO?
Use canonical tags to tell search engines which URL you prefer for indexing and ranking when duplicate content exists. This consolidates signals and prevents dilution.
How do I add a canonical tag in HTML?
Insert a link element with rel="canonical" and an href attribute pointing to your preferred URL inside the <head> section. Always use an absolute URL.
How do I add a canonical tag in WordPress without a plugin?
Edit your theme's header.php file and insert the canonical tag in the <head> using a conditional function like wp_get_canonical_url(). Backup the file first.
Sources
- Google Search Central Official Google guidance on consolidating duplicate URLs
- Moz Canonicalization Guide Detailed explanation of canonicalisation and best practices
- Ahrefs Canonical Tags Guide Practical examples of common canonical mistakes
- Yoast SEO documentation WordPress-focused canonical tag implementation guide