Canonical Tag
A canonical tag is an HTML element that tells search engines which URL is the master version when multiple URLs serve the same or similar content.
Key facts
- The canonical tag is placed in the <head> of a webpage as <link rel="canonical" href="https://example.com/page">.
- It helps prevent duplicate content issues by indicating the preferred URL for indexing.
- Search engines may ignore a canonical tag if the pages are too dissimilar or there are conflicting signals.
- Self-referencing canonicals (pointing to the page itself) are considered good practice.
- Canonical tags can also be sent via HTTP headers for non-HTML resources like PDFs.
Also called
rel=canonical, canonical URL tag
Use it for
Indicating the preferred URL for indexing and ranking among duplicate pages.
Applies to
All major search engines (Google, Bing, Yahoo, Yandex)
How a Canonical Tag Functions
A canonical tag is an HTML element that tells search engines which URL is the master version when multiple URLs serve similar content. It is written as <link rel="canonical" href="https://example.com/page"> and placed in the <head> of a page. This tag helps consolidate indexing signals, such as link equity and ranking, to the preferred URL.
The tag is a hint, not a directive. Search engines may ignore it if the pages are too dissimilar or if other signals (like internal links or what is a sitemap) point elsewhere. For that reason, consistency across your site is important.
When to Use a Canonical Tag
Canonical tags are essential in several scenarios:
For example, a product page with sorting parameters such as ?sort=price creates multiple URLs. Using a canonical tag on each variant pointing to the base product page prevents dilution of ranking signals. Similarly, syndicated articles should include a canonical tag pointing back to the original source to ensure search engines credit the original author.
- Duplicate content: When identical pages exist on multiple URLs (e.g., ?sessionid=1 and ?sessionid=2).
- SEO faceted navigation: Filtered or sorted product listing pages that show the same products as the base category.
- Syndicated content: When your content appears on other sites, canonical back to your original.
- Print-friendly versions: Separate print pages (e.g., /article/print) should canonical to the original article.
Best Practices for Implementing Canonical Tags
Follow these guidelines to avoid common issues:
Using absolute URLs is critical because relative URLs can be misinterpreted by search engines, especially when pages are accessed via different protocols or subdomains. Placing more than one canonical tag on a page creates ambiguity and may cause search engines to ignore all canonical signals. A self-referencing canonical on each page reinforces the intended URL, even if no duplicates exist. For non-HTML files like PDFs, the HTTP header method is the only reliable way to specify a canonical URL.
- Use absolute URLs (e.g., https://example.com/page, not /page) — this is the canonical URL format.
- Place only one canonical tag per page; multiple tags confuse search engines.
- Include a self-referencing canonical on each page (pointing to itself) to be explicit.
- For non-HTML resources like PDFs, use the Link HTTP header with rel=canonical.
- Keep canonicals consistent with internal links and sitemap entries.
How Search Engines Process Canonical Tags
Google considers the canonical tag a strong signal but not absolute. It will typically use the declared canonical if the content is substantially similar. If the pages are too different, Google may ignore the canonical and select its own preferred URL.
Canonical tags help consolidate link equity; all links to duplicate URLs funnel value to the canonical. They also reduce crawl waste by guiding Google to fewer URLs.
Google's algorithm evaluates the canonical tag along with other signals such as internal links, sitemaps, and redirects. If the canonical tag points to a URL that is substantially different in content, Google may override it and choose its own preferred URL. Additionally, Google uses the canonical URL as the basis for displaying the page in search results and for consolidating link equity. This means that all backlinks and social signals pointing to duplicate URLs are attributed to the canonical URL. For best results, ensure that the canonical URL is also the one you want to appear in search results.
Common Mistakes and Their Consequences
A frequent mistake is using relative URLs in the canonical href. Browsers resolve relative URLs differently, often leading to canonical errors. Search engines may misinterpret the intended canonical.
Another error is implementing multiple canonical tags on one page. Search engines may choose one arbitrarily, or treat the entire page as invalid.
Pointing the canonical to a different host or protocol (e.g., HTTP when the site uses HTTPS) can cause indexing on the wrong version.
Using how Google Tag Manager works to inject canonical tags is unreliable as GTM runs after initial page load; search engines may not execute JavaScript for indexing.
Canonical Tags and Other Technical SEO Signals
Canonical tags are just one part of URL management. They interact with 301 redirects, hreflang tags, and robots meta tags. For example, a 301 redirect supersedes a canonical tag—if you redirect, the target page becomes the canonical.
Hreflang tags and canonical tags serve different purposes. Hreflang identifies language and regional versions, while canonical selects one preferred URL per language. They should be used together but not contradict each other.
The title tag is independent of the canonical tag; changing the canonical does not change the title tag displayed in search results.
| Scenario | Recommended Action | Reason |
|---|---|---|
| Two pages with identical content | Canonical tag | Consolidates signals without moving the page. |
| Page moved permanently to new URL | 301 redirect | Forces search engines and users to the new location. |
| URL parameters create near-duplicates | Canonical tag | Points to the clean, parameter-free URL. |
| Content syndicated on another domain | Canonical tag on syndicated page | Credits the original source for ranking. |
Common mistakes
- Using relative URLs instead of absolute canonical URLs Browsers may resolve relative URLs incorrectly, leading to wrong or broken canonicals.
- Declaring more than one canonical tag on a page Search engines may ignore both or pick any arbitrarily, causing inconsistent indexing.
- Pointing the canonical to the wrong protocol (e.g., HTTP instead of HTTPS) The incorrect version may be indexed, losing security and ranking signals.
- Using one canonical across different language versions Hreflang and canonical conflict; search engines may not properly target language variants.
Questions
what is canonical tag
A canonical tag is an HTML element that tells search engines which URL is the preferred version when there are similar pages. It helps avoid duplicate content issues and consolidates ranking signals.
how to add canonical tag in html
Add <link rel="canonical" href="https://example.com/page"> inside the <head> of your HTML document. Make sure the URL is absolute and points to the master version.
how to add canonical tag in wordpress
In WordPress, use an SEO plugin like Yoast, which provides a canonical field in the edit screen. Alternatively, manually edit your theme's header.php to include the tag dynamically.
how to use canonical tag in seo
Use canonical tags to tell search engines which version of a page you want to rank when duplicates exist, such as from URL parameters or faceted navigation. Always ensure consistency with internal links and sitemaps.
See also
- CanonicalCanonical SEO is the practice of telling search engines which URL should be treated as the pref…
- Hreflang TagHreflang tags are HTML attributes that tell search engines which language or regional version o…
- Heading Tags SEOHeading tags (H1-H6) are HTML elements that organise content into a clear hierarchy, helping bo…
- H1 Tag SEOAn H1 tag is the HTML element used as the main heading on a webpage, identifying its primary to…
- HTML Head KeywordsThe HTML <head> is the non-visible part of a page that holds metadata like the title, meta tags…
Sources
- Consolidate duplicate URLs Google Search Central
- Robots meta tag Google Search Central
- Canonicalization Guide Moz
- SEO Canonical: The Beginner’s Guide Yoast
Outbound links are unpaid and nofollow. If one has gone stale, tell me.