By SitemapFixer Team
Updated April 2026

Canonical Tags: How to Use Them Correctly for SEO

Find canonical issues on your site freeTry SitemapFixer Free

What a Canonical Tag Is and How It Works

A canonical tag is an HTML element that tells search engines which version of a page is the definitive, preferred one. When multiple URLs serve similar or identical content, the canonical tag consolidates all ranking signals — backlinks, crawl data, engagement signals — into a single URL. This prevents duplicate content from splitting your ranking power across multiple versions of the same page.

When Google encounters a canonical tag, it selects the canonical URL as the version to index. Non-canonical versions may still be crawled but their ranking signals flow to the canonical target. The effect is that only the canonical URL competes in search results for that content.

Canonical Tag HTML Syntax

Place the canonical tag inside the <head> section of your HTML. It must use an absolute URL (including protocol and domain) — never a relative path. Only one canonical tag per page is valid; if multiple are present, Google will ignore them all.

<head>
  <link rel="canonical" href="https://yoursite.com/preferred-page/" />
</head>

In Next.js, set canonicals via the metadata object using alternates.canonical. In WordPress with Yoast or RankMath, the canonical is set in the SEO settings for each post or page. Always verify the rendered HTML to confirm the tag is present and correct — plugins can sometimes override or duplicate canonical values.

Self-Referencing Canonicals: Every Page Needs One

A self-referencing canonical is a canonical tag on a page that points to its own URL. Even if a page has no duplicates, it should still declare a self-referencing canonical. Without it, any small variation in how users reach the page — adding a trailing slash, a UTM parameter, or an uppercase letter — creates a technically different URL that Google might treat as a separate page.

For example, if your article lives at https://yoursite.com/guide/ and someone shares a link with ?utm_source=twitter appended, Google may see both URLs. If the original page has a self-referencing canonical, Google immediately knows which version to index. Without it, Google has to guess — and sometimes guesses wrong.

The best practice is simple: every indexable page on your site should have a canonical tag pointing to itself. Most modern CMS platforms and frameworks do this automatically, but verify it in your rendered source code.

When to Use a Canonical to a Different Page

Use a non-self-referencing canonical when a page is a duplicate or near-duplicate of another page that should be preferred. Common scenarios:

  • URL parameter pages — a page like /products/?sort=price should canonical to /products/ because both serve the same content with minor sorting variation.
  • Session ID URLs/page/?sessionid=abc123 should canonical to /page/.
  • Tracking parameters/article/?ref=email should canonical to /article/.
  • Printer-friendly versions/article/print/ should canonical to /article/.
  • Mobile subdomains — pages on m.yoursite.com should canonical to their desktop counterparts.
  • Syndicated content — if your article appears on another site, the syndicated copy should canonical back to your original.

Canonical Tags and Sitemaps: The Critical Relationship

Every URL you include in your XML sitemap must be the canonical version of that page. This is a hard rule: only canonical URLs belong in your sitemap. If you submit a URL that has a canonical pointing to a different address, Google will see the submitted URL as non-canonical and will index the canonical target instead of the submitted URL.

This mismatch is one of the most common causes of the Submitted URL not indexed status in Google Search Console's Pages report. Google is effectively telling you: the submitted URL's canonical points somewhere else, so the other page was indexed instead.

To audit this, check each URL in your sitemap using the URL Inspection tool in GSC. Under the Indexing section, it shows the canonical Google selected. If it differs from the submitted URL, the canonical tag on that page is pointing elsewhere and needs to be fixed.

Canonical vs noindex: When to Use Which

Canonical tags and noindex serve different purposes and should not be confused. A canonical tag tells Google which version to index among duplicates — it consolidates authority. A noindex tag tells Google not to index a page at all — it removes the page from search results entirely.

Use a canonical when you want one version of a page to rank, and you want its ranking signals preserved. Use noindex when a page should never appear in search results and you do not want to consolidate its signals anywhere.

Never use both a non-self-referencing canonical and a noindex tag on the same page. If a page canonicals to Page A but also has noindex, the signals conflict. Google may not respect either directive. If you want Page A to absorb the link equity from Page B, use a canonical on Page B pointing to Page A — do not also noindex Page B.

Cross-Domain Canonicals for Syndicated Content

Canonical tags can cross domain boundaries. If you publish original content on your site and allow other publications to republish it, the syndicated copy should include a canonical tag pointing back to your original URL. This tells Google that your version is the authoritative one, even though the content appears on a different domain.

Google honors cross-domain canonicals, though it treats them as a strong hint rather than an absolute directive. Requirements for cross-domain canonicals to be effective: the canonical target must be crawlable, return a 200 status, and not itself have a canonical pointing elsewhere. Major publishers use cross-domain canonicals to allow content creators to retain SEO credit for their original posts.

Canonical Tag Mistakes That Kill SEO

  • Relative URLs — always use absolute URLs with protocol. href="/page/" is invalid; use href="https://yoursite.com/page/".
  • Canonical to a redirecting URL — if your canonical target returns a 301, Google has to follow the redirect to find the final URL. Point directly to the final destination URL.
  • Canonical chains — Page A canonicals to Page B, which canonicals to Page C. Google may not follow the full chain. Always canonical directly to the final preferred URL.
  • Conflicting signals — a page has a canonical pointing to URL A but is also listed in the sitemap as the primary URL. The canonical should match the sitemap entry.
  • Blocking the canonical target — if your canonical target is blocked by robots.txt, Googlebot cannot crawl it to read and process the canonical. The target must be fully crawlable.
  • No canonical on key pages — every indexable page should have at minimum a self-referencing canonical. Missing canonicals leave pages vulnerable to accidental duplication.
Find canonical issues on your site
Free analysis in 60 seconds
Analyze My Sitemap
Related guides

Related Guides