Skip to content

Search

Articles, tools, solutions and knowledge base guides

Start typing to search across articles, tools and apps.

Canonical URL: duplicate content, URL parameters and keyword cannibalization

Canonical URLs help search engines identify the representative address for equivalent or very similar content. They do not let publishers arbitrarily transfer visibility between pages. An online store may expose one product through multiple campaign URLs, while two articles may share a topic but answer different questions. These situations require different solutions. This guide covers URL design, implementation, troubleshooting and the editorial decisions that resolve genuine SEO conflicts.

Published Written by Reading time 12 min read
On this page Contents: quick navigation between sections

What is a canonical URL?

A canonical URL is the representative address of a group of equivalent pages. Google may select a different representative from the one declared by the website. A canonical declaration expresses a preference rather than an indexing or ranking guarantee. [1][2]

For example, /products/mug and /products/mug?utm_source=newsletter display the same product. The former is a suitable indexing candidate, while the latter remains useful for campaign measurement. Users do not need to be redirected simply to consolidate search signals.

How Google selects the canonical URL

Google groups pages based on their content and other signals. Permanent redirects and canonical declarations carry substantial weight; sitemap inclusion is a weaker indicator. [1][3] Google does not publish a numerical weighting formula. Consistent internal links, sitemap entries and HTTPS addresses reduce ambiguity.

Ordinary duplication is not an automatic SEO penalty. It may waste crawling resources, complicate measurement or surface the wrong URL. Distinguish it from deliberate search spam. [2][4]

Implementing rel=canonical in HTML and HTTP

<link rel="canonical" href="https://example.com/products/mug" />
HTTP/1.1 200 OK
Content-Type: application/pdf
Link: <https://example.com/guides/canonical.pdf>; rel="canonical"

Place a single link element inside a valid HTML head. Prefer an absolute HTTPS address and include a self-referencing canonical on the representative page. A Link response header is an alternative for non-HTML resources such as PDF documents. The examples below are separate implementations, not a requirement to use both. [1][5]

The destination should return HTTP 200, be accessible to crawlers, be indexable and represent the source content. Avoid pointing to errors, noindex pages, redirect chains or an unrelated homepage. A reciprocal A → B and B → A mapping makes selection ambiguous.

A canonical can reference another domain for equivalent documents. For syndicated articles, however, it is not reliable protection against duplication: Google advises partners to block indexing of their copy when the goal is to avoid duplicate publications. [5][15]

Canonical, redirects, noindex or robots.txt?

MechanismPurposeDoes the variant remain accessible?
rel=canonicalConsolidate equivalent pagesYes
301 / 308Permanently move a URLNo, users reach the destination
noindexExclude from the indexYes, if public
robots.txtControl crawlingYes for users

Choose the mechanism according to the intended outcome. A permanent 301 or 308 redirect makes sense when an old address is retired. A canonical lets the variant remain accessible. Noindex excludes a page from search; it is not a signal consolidation method. [3][6]

Robots.txt manages crawling, not guaranteed removal from the index. Keep a document crawlable if you expect Google to read its noindex or canonical. Combining conflicting instructions is not a stronger solution. Protect private content with authentication rather than SEO rules. [6][7]

URL parameters: what should be removed?

ParameterExample canonicalReason
/shoes?utm_source=email/shoesCampaign measurement
/shoes?sort=price/shoesSame items, different order
/shoes?page=2/shoes?page=2Different list page
/shoes?color=red/shoes?color=redValuable independent category

Classify parameters by their effect on content. Tracking IDs, UTM values and presentation preferences often leave the main content unchanged. Category filters, page numbers, languages or product identifiers can change it. Never strip the entire query string blindly. [8]

The table assumes sorting does not change the set of items shown on the given page. When sorting and pagination interact, that assumption may fail. Do not normalize case, repeated parameter order or path encoding without verifying how the server interprets them. [8][9]

Faceted navigation and pagination

Identify filter combinations that independently satisfy search demand. A red-shoes listing might deserve a self-referencing canonical if it offers a useful selection, distinct content and a stable URL. Limit other combinations through link generation and a deliberate crawling policy. Canonical is not an immediate crawl-rate control. [9]

Each valid paginated page should have a distinct URL and a self-referencing canonical. Page two contains items not found on page one. Connect pages with real a href links even if the interface also uses a Load more button. Return a proper 404 for nonexistent combinations and out-of-range pages rather than redirecting to the beginning. [9][10]

If a filter has no value as a standalone search result but must remain accessible, use noindex while allowing crawling. If the goal is only to reduce requests, consider narrowly scoped robots.txt rules; do not expect Google to read canonical or noindex on blocked URLs. Google recommends HTTP 404 for empty filter combinations and nonexistent page numbers. [6][7][9][10]

International SEO: canonical and hreflang

<link rel="canonical" href="https://example.com/pl/poradnik" />
<link
  rel="alternate"
  hreflang="pl"
  href="https://example.com/pl/poradnik"
/>
<link
  rel="alternate"
  hreflang="en"
  href="https://example.com/en/guide"
/>
<link rel="canonical" href="https://example.com/en/guide" />
<link
  rel="alternate"
  hreflang="pl"
  href="https://example.com/pl/poradnik"
/>
<link
  rel="alternate"
  hreflang="en"
  href="https://example.com/en/guide"
/>

Prefer separate canonical URLs for actual translations, such as Polish and English. Hreflang connects localized equivalents rather than replacing canonical. Each language should list itself and its equivalents, with reciprocal annotations. An optional x-default can identify a language selection page. [11]

Do not canonicalize every translation to English. For nearly identical regional pages in one language, consider selecting a canonical in that language and using hreflang for regional alternatives. Avoid making localized addresses inaccessible through forced Accept-Language or cookie-based redirects; users and crawlers should be able to open each URL directly. [11][12]

SSR, CSR, SSG and safe metadata generation

export function createArticleCanonical(siteOrigin, articlePath) {
  const origin = new URL(siteOrigin);

  if (origin.protocol !== "https:" || origin.origin !== siteOrigin) {
    throw new Error("Expected a trusted HTTPS origin");
  }

  const path = articlePath.split("#", 1)[0];
  const articlePathPattern = /^\/[a-z0-9-]+(?:\/[a-z0-9-]+)*$/;

  if (!articlePathPattern.test(path) || /\s/.test(path)) {
    throw new Error("Expected a normalized article path");
  }

  return new URL(path, origin).href;
}

With SSR, SSG and ISR, derive the canonical from the published content identifier, locale and trusted domain configuration. The initial HTML should contain the correct URL. If CSR makes this impossible, JavaScript can supply the canonical during rendering; do not overwrite a correct initial declaration with a different value after hydration. [13]

Do not derive the origin from arbitrary Host or X-Forwarded-Host headers or unvalidated redirect parameters. Mistakes can poison caches or point to another domain. The function below accepts a trusted content-catalog path, not a raw request URL. It rejects query strings and removes fragments because it serves article paths only. Filters and pagination require their own identity policy.

The function accepts only a published article path from the content catalog, with lowercase ASCII letters, digits and hyphens in its segments. It discards an optional fragment. Queries, encoded characters, dot segments and trailing slashes are rejected under this site's URL policy. This is not a general-purpose URL normalizer; sites with different slug conventions must adapt the rule.

Keyword cannibalization is not duplicate content

Two pages can share a keyword while satisfying distinct needs. A guide to the meaning of canonical and a guide to indexing errors need not compete. Cannibalization becomes a concern when pages targeting similar intent undermine performance, for example when Google repeatedly switches to the less appropriate page for valuable queries. [14]

Compare coverage, queries, conversions and links. If two articles substantially overlap, consolidate useful material and redirect the retired address to its relevant replacement. If both are valuable, sharpen their titles, headings and linking. Canonical is not a substitute for content strategy; reserve it for equivalent versions rather than suppressing independent pages.

Diagnosing issues in Google Search Console

Use URL Inspection to compare the user-declared canonical and the Google-selected canonical. An alternate page with a valid canonical may be expected for a tracking URL. A different Google selection calls for examining the content and signals rather than automatically requesting indexing again. [15]

Inspect both HTTP responses, source HTML, rendered DOM, sitemap, hreflang and internal links. The live test checks current accessibility but cannot predict Google's canonical selection. After fixing the issue, request indexing for the important address and monitor the outcome after recrawling, without assuming a fixed deadline. [15][16]

In the Performance report, filter a query and compare pages across time periods alongside clicks and conversions. Most data is credited to Google's selected canonical; a duplicate's lack of impressions therefore does not prove that its actual URL received no visits. [17]

Diagnostic example: /products/mug declares itself, but Google selects /products/mug?ref=partner. Compare the main content, HTTP status and metadata of both responses. If equivalent, remove the parameter from internal links and the sitemap, keep the campaign variant accessible with canonical to the clean URL, and inspect both addresses after deployment. If content differs, first decide whether they should be consolidated at all. [1][15][16]

Audit scenario and implications for SEO, GEO and AEO

Suppose a shop has 10,000 products and generates twelve parameter variants per product. That is potentially 120,000 additional URLs, not a measurement of crawling or indexing. Normalizing links, limiting unnecessary filters and using appropriate canonicals can reduce variants. Track the proportion of expected canonical selections, variant requests in logs, search visibility and conversions before and after deployment.

Google's generative search features have no special canonical tag or citation guarantee. Technical accessibility, indexability and eligibility for snippets are prerequisites, not a promise of appearance. [18] Canonical consistency is foundational SEO, not a separate GEO shortcut.

Record the source URL, declared and selected canonical, HTTP status, robots directives, sitemap membership and incoming internal links. Acceptance criteria: important URLs have aligned signals and campaign variants no longer replace the intended pages in the index. Compare the baseline with data after recrawling; a reduction in indexed duplicates alone does not mean SEO has declined.

Meta tag generator · Guide to robots.txt and sitemap.xml · Website audit: SEO and technical checks

Use the meta tag generator to prepare markup and the robots.txt and sitemap.xml guide to understand crawling and indexing controls. A generator produces declarations; it cannot tell you which canonical Google has selected. For that, use Search Console. [19][20]

For a broader technical SEO audit, use the separate POLPROG checklist. [21]

Define content identity before designing URLs and variant rules. Align canonical declarations with redirects, sitemaps and links, then verify Google’s choice after recrawling. When search intent is the problem, improve the content architecture rather than forcing a canonical.

Tools for this topic

SEO Technical SEO Canonical URL rel=canonical Duplicate Content URL Parameters Keyword Cannibalization Google Search Console hreflang Faceted Navigation Pagination Indexing

Frequently asked questions

Does canonical guarantee indexing?

No. Google may choose another URL or index none of the variants. [1][2]

Does canonical replace a 301 redirect?

No. Use a permanent redirect when the old address is retired; consider canonical when it must remain accessible. [3][6]

Should all paginated pages canonicalize to page one?

No. /shoes?page=2 contains a different selection of products from /shoes. [9][10]

Should all translations share one canonical?

No. Actual translations need their own canonical URLs and reciprocal hreflang annotations. [11]

Are two results for one keyword cannibalization?

No. Evaluate search intent and the performance of both pages before merging them. [14]

How do I check Google’s selected canonical?

Open the indexed URL report in Search Console and compare the site declaration with Google's chosen address. [16]

Sources and references

  1. Google Search Central, Specify a canonical URL↩1↩2↩3↩4↩5
  2. Google Search Central, URL canonicalization↩1↩2↩3
  3. Google Search Central, Redirects and Google Search↩1↩2↩3
  4. Google Search Central, SEO Starter Guide↩
  5. IETF, RFC 6596: The Canonical Link Relation↩1↩2
  6. Google Search Central, Block indexing with noindex↩1↩2↩3↩4
  7. Google Search Central, Robots.txt introduction↩1↩2
  8. Google Search Central, Ecommerce URL structure↩1↩2
  9. Google Crawling Infrastructure, Faceted navigation↩1↩2↩3↩4↩5
  10. Google Search Central, Pagination↩1↩2↩3
  11. Google Search Central, Localized versions↩1↩2↩3
  12. Google Search Central, Multilingual and multiregional sites↩
  13. Google Search Central, JavaScript SEO↩
  14. Ahrefs, Keyword cannibalization↩1↩2
  15. Google Search Central, Fix canonicalization issues↩1↩2↩3↩4
  16. Google Search Console, URL Inspection↩1↩2↩3
  17. Google Search Console, Impressions, position and clicks↩
  18. Google Search Central, AI features and your website↩
  19. POLPROG, Meta tag generator↩
  20. POLPROG, Guide to robots.txt and sitemap.xml↩
  21. POLPROG, Website audit: SEO and technical checks↩

Was this helpful?

Get new articles by email

One short email per new Learning article. No spam, unsubscribe in one click.

We only use your email to send new articles. No third-party sharing.

Back to Learning