Canonical URL
A canonical URL is the preferred version of a page that search engines should treat as the main URL when similar or duplicate content exists across multiple URLs.
- Also called
- rel canonical, canonical tag
- Applies to
- duplicate pages, near-duplicate pages, parameterised URLs
- Commonly confused with
- redirect, 301 redirect, noindex tag
Key points
- A canonical URL tells search engines which version of a page to treat as the primary one when duplicates exist.
- Using a canonical tag consolidates ranking signals like backlinks toward the preferred URL.
- Google may ignore a declared canonical if its own signals point to a different representative URL.
- Canonical tags work across different domains, not just within the same site.
- Always use an absolute URL in the href value of the rel canonical link element.
How it works
A canonical URL is declared using a rel canonical link element placed in the <head> of a page. The element points to the absolute URL that should be considered the main version. For example, a page accessible at both http://example.com/page and https://example.com/page might declare the HTTPS version as canonical.
Google defines canonicalization as selecting the representative URL for a piece of content. When it encounters multiple URLs with the same or very similar content, it groups them into a canonical cluster and uses the declared canonical as the primary signal. However, Google can choose a different canonical if its own analysis — based on internal links, sitemaps, redirects, or content similarity — indicates another URL is more representative.
The canonical tag is not a directive but a strong hint. Other signals such as internal linking patterns, the presence of redirects, and the URL listed in a sitemap also influence Google's final choice. For SEO practitioners, canonicalisation is a core cleanup control for faceted navigation, tracking parameters, www versus no www variants, and other URL duplicates.
Why it matters
Canonical URLs help consolidate ranking signals like backlinks toward the preferred URL, reducing duplicate-content confusion. Without a canonical declaration, search engines might split link equity across multiple versions of the same content, weakening the ranking potential of any single page.
Canonicalisation also ensures that search engines index the version you actually want to rank. For example, if the same product page is accessible with and without tracking parameters, a canonical tag prevents the parameterised version from appearing in search results instead of the clean URL. This control is especially important for ecommerce sites with faceted navigation or filtering systems.
When used correctly, canonical tags help Google show only one version of otherwise duplicate content in search results, improving the user experience and avoiding penalties for thin or duplicate content. They also simplify site management by allowing multiple URLs to point to a single authoritative source.
Where it changes your decision
- When you have tracking parameters (e.g., utm_source, utm_campaign) appended to URLs: use a canonical tag pointing to the clean URL so search engines ignore the parameterised versions.
- When your site is accessible via both www and no www variants: declare a canonical on one version to avoid splitting link equity between the two.
- When you syndicate content across multiple domains: use a cross-domain canonical tag pointing to the original source to consolidate ranking signals.
Common mistakes
- Using canonicals as a substitute for redirects when the duplicate page should not remain accessible. Consequence: the duplicate page stays indexable and can still appear in search results.
- Pointing canonicals inconsistently across a chain of pages instead of directly to the final preferred URL. Consequence: Google may ignore the chain and choose a different canonical, or the link equity gets diluted.
- Canonicalising pages that are not truly duplicates or near-duplicates. Consequence: search engines may ignore the tag or treat the signal as spammy, potentially harming rankings.
- Assuming Google will always obey the declared canonical even when other signals conflict. Consequence: the wrong URL may be indexed, wasting SEO effort on a non-preferred version.
Questions people ask
What is canonical URL in SEO?
A canonical URL in SEO is the preferred version of a page that search engines should treat as the main URL when duplicate or near-duplicate content exists across multiple URLs. It is declared using a rel canonical link element in the page's HTML head. This helps consolidate ranking signals and ensures the correct page appears in search results.
How to add canonical tag in HTML?
To add a canonical tag in HTML, place a link element inside the <head> section of the page. The element should use rel="canonical" and an href attribute with the absolute URL of the preferred version. For example: <link rel="canonical" href="https://example.com/page/" />. Always use the full URL including the protocol (https) and domain.
How to add canonical tag in WordPress without plugin?
To add a canonical tag in WordPress without a plugin, edit your theme's header.php file and insert a link element with rel="canonical" inside the <head> section. Use WordPress functions like get_permalink() to dynamically output the correct URL for each post or page. Alternatively, you can add the tag via a custom function in your theme's functions.php file using the wp_head hook.
How to change canonical URL in WordPress?
To change the canonical URL in WordPress, you can use an SEO plugin like Yoast SEO or Rank Math, which provide a field to set a custom canonical URL per post or page. Without a plugin, you can modify the theme's header.php or use a custom function in functions.php to override the default canonical. Ensure the new URL is absolute and points to the intended preferred version.
Sources
- Google Search Central Primary source for how Google defines canonicalization and canonical URLs.
- Google Search Console Help Explains canonical URLs, duplicate groups, and how Google selects canonicals.
- Conductor Academy Clear SEO-focused explanation of rel=canonical and duplicate-content use cases.
- Moz Learn SEO Well-known SEO reference covering canonical tags and practical implementation.