Get your free SEO audit today Call 91 060 30 90
</>Technical Guide · 16 min read

Canonicalization and duplicate content: a technical guide

Duplicate content is almost never intentional: it shows up as a side effect of normal technical decisions, like serving the same site on http:// and https://, with and without www, with tracking parameters, or showing the same product under two different ecommerce categories. Google doesn't penalize duplicate content as if it were spam in most of these cases, but it does have to decide which of all the versions to show in search, and that decision doesn't always match the one you would have chosen if you don't give it clear instructions.

What the canonical tag actually is

The <link rel="canonical"> tag is a signal, not an absolute directive. It tells Google "of all the URLs that could show this same content, this is the one I consider the primary one," and Google usually respects it, but can ignore it if it finds stronger contradicting signals (for example, if the URL marked canonical has far fewer internal and external links than another variant, or if the canonical points to a page that is, in practice, substantially different).

<link rel="canonical" href="https://www.yourdomain.com/products/nordic-chair">

A principle that's often forgotten: the canonical must be self-referential on the main URL itself (the primary page must point to itself as canonical), and every variant (with parameters, with and without a trailing slash, with different casing) must point to that same primary URL, never cross-referencing each other.

The most common duplication cases and their technical fix

The first and most widespread is protocol and subdomain duplication: the same site accessible via http://yourdomain.com, https://yourdomain.com, http://www.yourdomain.com and https://www.yourdomain.com simultaneously. The fix isn't the canonical tag but a permanent 301 redirect from the three unwanted versions to the single official version, configured at server level:

# Force https and www in a single block, in .htaccess
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

The second case is URL parameters that don't change the content: session identifiers, campaign codes (utm_source, utm_medium), or sort order in a listing (?sort=price-asc). Here the canonical tag is the right tool, always pointing from the parameterized version to the clean version, because blocking these URLs in robots.txt would stop Google from ever seeing the canonical (a contradiction already covered in the crawling guide).

The third case, more specific to ecommerce, is the same product reachable from several categories (/women/dresses/blue-dress and /sale/blue-dress). Here the decision is as much business as technical: it's usually best to set the canonical on the more stable category path (the one that doesn't depend on a temporary campaign like "sale"), while the remaining paths stay indexable only if they add real navigational value, but canonicalized toward the main one so relevance signals aren't split across several URLs for the same product.

Near-duplicate content: the hardest case to diagnose

Not all duplication is an exact copy. Near-duplicate content is harder to detect because Google doesn't just compare HTML, but content similarity patterns at scale: product pages with the same spec sheet and only size or color changed, landing page templates reused with minimal text changes between cities or services, or blog articles superficially rewritten from the same template. In these cases the canonical tag isn't always the right tool: if the content adds real differential value (even if similar), the fix isn't canonicalization but expanding the real differentiation of each page; if it doesn't, the fix is consolidating into fewer pages or marking them noindex.

hreflang doesn't replace canonicalization

On multilingual sites it's common to conflate two distinct problems. hreflang tells Google which language or region version to show each user, but it doesn't solve duplication within the same language: if the Spanish version for Spain and the Spanish version for Mexico are identical except for the price in local currency, they're still, for canonicalization purposes, near-duplicate content between each other, and need their own canonical strategy independent of the hreflang that relates them.

Pagination: when to canonicalize and when not to

A frequent mistake is setting the canonical of every page in a paginated series (page 2, 3, 4 of a listing) to point at page 1. This tells Google to ignore the specific content of those pages, which is fine if pages 2 onward have no unique relevant content, but backfires if those pages index products or articles that don't appear anywhere else: in that case every page in the series should be self-referential (canonical to itself), and the relationship between them is communicated better through clear navigation links (previous/next) than through cross-canonicalization.

How to check which canonical Google is actually seeing

Search Console's URL Inspection shows both the canonical declared by the site and the canonical Google has actually "selected," and on sites with contradicting signals these two can differ. When they don't match, the diagnosis is almost always internal links pointing to the non-canonical version more often than to the canonical, or a sitemap that still lists non-canonical URLs.

Frequently asked questions

Does duplicate content directly hurt rankings?

There's no "duplicate content penalty" in the sense of a manual sanction, except in cases of massive scraping of someone else's content. The real problem is that Google picks one version to show and dilutes the signals (links, authority) across the non-chosen versions, which in practice lowers the ranking of all of them.

Can I use noindex instead of canonical for duplicate URLs?

It's a valid alternative in some cases, but with an important difference: noindex removes the URL from the index without transferring its signals to any other, while a properly configured canonical consolidates those signals toward the main URL. For variants with their own inbound links, canonical is usually the more efficient option.

Must the canonical always be a URL on the same domain?

Not necessarily: cross-domain canonical exists, useful when the same content is syndicated on another domain (for example, a republished press release), but it's a specific case and should be used by agreement between both domains, not as a generic fix for internal duplication.

How long does it take Google to apply a canonical change?

It depends on crawling: until Googlebot revisits the URL with the modified canonical, it keeps applying the previous decision. On sites with frequent crawling it can be a matter of days; on sites with low crawl priority it can take weeks.

Does blocking the "?" parameter in robots.txt help avoid duplicates?

Only partly: it stops Googlebot from spending crawl budget on those URLs, but as explained in the crawling and indexing guide, if they're blocked Google never gets to read their canonical, so if those URLs were already indexed via external links, they'll keep showing up until they're handled with canonical (not blocking) or removed manually.

Want to talk about technical SEO for your site?

Tell us about your project and we'll tell you how we can help, no strings attached.

Call 91 060 30 90