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

URL structure and technical normalization: case, trailing slashes and parameters

To a browser, /Product and /product can look like "the same page" if the server responds with the same content on both. To a crawler, they're two distinct URLs until told otherwise explicitly. That difference, rarely noticed while browsing by hand, is the cause of a huge share of the duplicate content issues that show up in technical audits: they aren't intentional content copies, they're technical variants of the same URL nobody normalized.

This guide walks through every point where a URL can branch into technical variants (case, trailing slash, parameters, protocol, subdomain) and which mechanism to use in each case to consolidate them into a single canonical URL, the one that should actually be crawled, indexed and receive links.

Uppercase and lowercase: URLs are case-sensitive by default

The path portion of a URL (everything after the domain) is case-sensitive by specification, though many web servers configured on case-insensitive filesystems (like Windows) end up serving the same content for /Contact and /contact without anyone deciding that on purpose. The problem isn't that both versions "work": it's that a crawler treats them as two distinct URLs, each accumulating its own links, its own crawl history and, potentially, its own index entry.

The most robust fix isn't trusting that a case-insensitive server "already handles it," but forcing a single canonical case (normally all lowercase) at the server level, 301-redirecting any uppercase variant to the lowercase one:

# Apache (.htaccess), force lowercase in the path
RewriteEngine On
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]

This removes the problem at the root instead of patching it with a canonical per page, which only signals preference but doesn't stop both versions from being crawled and accumulating separate history.

Trailing slash: /page and /page/ aren't the same URL

Same as with case, /services and /services/ are technically two distinct URLs unless the server explicitly treats them as equivalent. The most widespread convention (though not universal) is to use a trailing slash for "directories" or listings and omit it for individual pages, but what actually matters isn't which convention you pick, it's applying it consistently across the whole site and having a single redirect rule resolving the non-canonical variant to the chosen one.

A common mistake on sites migrating from one CMS to another is that the new platform changes the default behavior (for example, it starts adding a trailing slash where there wasn't one before) without anyone auditing or redirecting the old URLs, suddenly generating thousands of with-and-without-slash variants coexisting in the index until Google decides, on its own and without warning, which of the two it prefers to show.

Query parameters: order, presence and their effect on the URL

?color=blue&size=m and ?size=m&color=blue point to the same filter for a person, but are different character strings to a crawler, which treats them as two different URLs unless told otherwise. The same happens with parameters that don't change the content but do change the URL: session identifiers, tracking parameters (utm_source, gclid) or sorting parameters that don't alter what's shown, only how.

The combination that works best in practice has three layers: canonical on every parameterized variant pointing to the clean URL without parameters (when the content is identical); robots.txt exclusion of parameter patterns that should never be crawled en masse (Disallow: /*?sessionid=); and, when the parameter does meaningfully change the content (pagination, a filter that substantially narrows the shown catalog), letting it be crawled but making sure the page itself includes a canonical to its own parameterized URL, not to the URL without it, because in that case they aren't duplicates but variants with genuinely different content.

www vs non-www, http vs https: four versions of the same domain

Without explicit configuration, a domain can respond simultaneously on four combinations: http://domain.com, http://www.domain.com, https://domain.com and https://www.domain.com. If all four return 200 content without redirecting to each other, they're four full copies of the site competing for the same content in a crawler's eyes. The fix isn't a canonical per page (which helps, but leaves all four versions crawlable) but server-level 301 redirects consolidating the three non-chosen variants toward a single canonical version, typically https://www.domain.com or https://domain.com depending on declared preference.

# Apache: force https and www as the canonical version
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]

Canonical vs 301 redirect: when to use each mechanism

Both signal "this is the version that matters," but they aren't interchangeable. A 301 redirect is a server-level instruction that stops the non-canonical URL from remaining independently accessible: the browser and the crawler never actually see content at that URL, only the hop. A canonical is a suggestion inside the HTML of a page that is fully accessible: it tells Google "I'd rather you index this other URL instead," but Google can crawl, and in edge cases even index, the URL carrying the canonical if it has strong signals contradicting it.

The practical rule: use 301 when the non-canonical URL has no reason to remain accessible (case, trailing slash, www/non-www, http/https, an old URL after a migration). Use canonical when the parameterized or variant URL does need to remain accessible as-is for site functionality to work (a filter, a sorted view, a campaign parameter), but you don't want it competing in the index against the clean version.

Does URL length or readability affect rankings?

There's no direct penalty for URL length, but there's a real indirect effect: long URLs with unreadable parameters (/product?id=48291&cat=12&ref=xzq) are harder to share, inspire less confidence when seen in a search result, and are usually a symptom (not a cause) of an architecture relying on technical parameters instead of descriptive paths. Migrating to readable URLs (/products/nordic-oak-chair) doesn't improve ranking by itself, but it does improve CTR in results and makes internal and external linking easier, which do carry direct-impact signals.

Normalization checklist before launching a new site

Before publishing: decide on and enforce a single case (lowercase); decide on and enforce a trailing slash or its absence consistently; force https and a single www/non-www version with server-level 301s; audit which query parameters exist on the site and classify each as "changes content" (needs its own canonical) or "doesn't change it" (canonical to the clean URL or robots.txt exclusion); and verify with a crawling tool that no non-canonical variant returns 200 without redirecting, because a misconfigured canonical on a URL that should also redirect is a contradiction that confuses more than it helps.

Frequently asked questions

Can I just use canonical and skip 301 redirects?

Not for variants that have no reason to remain accessible (www/non-www, http/https, case). There canonical is a weak signal Google can ignore; a 301 is the only way to guarantee only one version stays accessible.

Do tracking parameters like utm_source hurt SEO?

Not directly, but if left unmanaged (without a canonical to the clean URL) they generate technically distinct URLs for every campaign combination, diluting crawling toward variants that should never be indexed separately.

Is changing the URL structure of an already-indexed site risky?

Yes, if not done with 301s from the old URL to the new one, mapped one to one. With correct redirects and enough time for Google to process them, the risk drops considerably, though some temporary fluctuation while signals transfer is normal.

Are hyphens or underscores better for separating words in a URL?

Hyphens (-). Google treats the hyphen as a word separator, but doesn't interpret the underscore (_) the same way, which can make two words joined by an underscore read as a single word for query matching purposes.

Do parameters in a URL always block indexing?

No, many parameterized URLs get indexed just fine if the content is genuinely distinct and valuable (an internal search results page with its own value, for example). The problem shows up when parameters generate near-identical content variants without managing them via canonical or exclusion.

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