URL Structure

How to structure URLs for SEO — anatomy, hyphens vs. underscores, keywords, case sensitivity, parameters, and why changing URLs almost never helps.

First published: Jun 26, 2026 · Last updated: Jul 18, 2026 · Advanced
demand #7 in Website Structure#91 in Technical SEO#122 on the site
1 evidence signal on this page

URL structure is how the parts of a web address — scheme, domain, path, query string, fragment — are organized. It mostly matters for crawling, usability, and comprehension, not rankings: keywords in URLs are a 'very light weight' signal at best. Use hyphens (Google treats underscores as word-joiners, hyphens as separators — Bing doesn't differentiate), keep casing consistent (paths are case-sensitive), minimize parameters, and change existing URLs 'very, very rarely.'

TL;DR — URL structure is mostly a crawling and comprehension concern, not a ranking lever. Keywords in URLs are a “very light weight” signal that fades once a page is indexed. Use hyphens (Google joins on underscores, separates on hyphens). Path casing can identify distinct URLs depending on server behavior, so mixed casing can create duplicate crawl paths. Parameters are the real crawl-efficiency risk. And changing existing URLs helps “very, very rarely” — so don’t, unless they’re genuinely broken.

Evidence for this claim Google recommends simple, descriptive, human-readable URLs, hyphens between words, and minimizing unnecessary parameters. Scope: Current Google URL structure guidance. Confidence: high · Verified: Google Search Central: URL structure best practices Evidence for this claim A URI is composed of standardized scheme, authority, path, query, and fragment components; semantics depend on the scheme and server. Scope: Generic URI syntax, distinct from search-engine recommendations. Confidence: high · Verified: IETF RFC 3986: URI Generic Syntax

Anatomy of a URL

Every URL decomposes into the same parts, and each has its own SEO implications:

PartExampleNotes
Schemehttps://Use HTTPS. HTTP vs HTTPS is a canonicalization signal.
Subdomainwww.Google may treat subdomains more like separate sites than subfolders do.
Domainexample.comHostname is not case-sensitive.
Path / slug/blog/url-structure/The part you control; is case-sensitive.
Query string?ref=newsletterParameters — the biggest source of duplicate/low-value URLs.
Fragment#anatomyGoogle “generally doesn’t support URL fragments” to change content.

Reserved characters must be percent-encoded per the standard; use non-ASCII text in your users’ language (transliterated where it helps) rather than gibberish IDs.

Do URLs affect rankings? Barely.

This is the question everyone actually wants answered. The honest answer: minimally.

  • Keywords in the URL are, per Google’s own Starter Guide, a factor where “the keywords in the name of the domain (or URL path) alone have hardly any effect beyond appearing in breadcrumbs.” John Mueller has called it “a very small ranking factor” and “a very light weight factor… less so after [the page is] indexed.” So a keyword in the URL might help Google during initial discovery, before it has crawled the content — but once the page is indexed, the content does the talking.
  • What matters more than URL wording is click depth — how many clicks from the homepage a page sits. Logical directory structure helps Googlebot estimate crawl frequency (a /policies/ folder rarely changes; /promotions/ changes often), but that’s about crawling, not ranking.

Bottom line: don’t restructure URLs purely to inject keywords. The juice isn’t worth the squeeze.

Hyphens vs. underscores

This is the one genuinely settled technical rule, and it’s Google-specific.

Google treats a hyphen as a word separator and an underscore as a word joiner. So red_shoes is parsed as the single token redshoes, while red-shoes is parsed as red and shoes. Gary Illyes’ reasoning: “many things on the internet have an underscore in them, [Google] can’t easily segment at underscore.” Matt Cutts said the same back in 2007 (“we still join on the underscore and separate on the dash”), and Google’s current docs still recommend hyphens.

There’s a wrinkle worth knowing: Mueller once said in 2016 the difference “doesn’t matter,” which muddied things — but the live documentation still says use hyphens, and that’s the safe call.

Bing is different. A Bing spokesperson confirmed: “We do not differentiate between dash and underscore in our URL ranking features.” So underscores don’t hurt you in Bing. But since you’re optimizing for both, use hyphens — it’s correct for Google and neutral for Bing.

URL length and the canonicalization myth

You’ll hear “shorter URLs rank better.” That’s a misreading.

URL length has no direct ranking impact. What’s true is narrower: when Google is choosing a canonical among duplicate or near-duplicate URLs, it may prefer the shorter, cleaner one — specifically a clean URL over the same URL with tracking parameters tacked on. As I put it in my canonicalization research: “This has been misconstrued over the years by SEOs to say that all your URLs should be shorter. But that’s not what was meant.” The preference is for a clean, parameter-free version over a parameter-heavy duplicate — not a universal “shorter wins” law. URL length is just one of roughly 40 canonicalization signals Google uses, alongside HTTPS preference, www vs non-www, trailing slash, and casing.

Case sensitivity is a real risk

URL paths, filenames, and query parameters are case-sensitive; the hostname is not. So example.com/Apple and example.com/apple are two different URLs (but Example.com and example.com are the same host).

Google can usually tell when two casings serve identical content and will canonicalize them — but you shouldn’t make it do that work. If both versions are reachable and not consolidated, you get duplicate content. And there’s a sharp edge most people miss: robots.txt is also case-sensitive. A Disallow entry for /Private/ does not block /private/. Standardize on lowercase and you sidestep all of it.

Exactly which casings resolve, redirect, or 404 depends on your server and application config — it’s not a universal rule. Test the actual responses (curl -I or a crawler) rather than assuming.

Trailing slashes

A trailing slash matters everywhere except the root:

  • Root domain: example.com and example.com/ are treated identically — no difference.
  • Everything else: example.com/page and example.com/page/ are different URLs. If both are reachable and neither consolidates to the other, that’s duplicate content.

Note that adding a trailing slash to an actual file (page.html/) won’t load the file. As I wrote in my trailing slash guide: “There’s always a risk with changes, so unless your setup is causing issues I wouldn’t try to force a change to your URLs.” Pick one format, enforce it with redirects and canonicals, and keep internal links consistent. As with casing, the actual non-root behavior is server- and application-dependent — verify what your setup actually returns rather than assuming.

URL parameters: the real crawl problem

Query parameters are where URL structure does the most SEO damage at scale. I split them two ways in my URL parameters guide:

  • Active parameters change page content — filtering, sorting, pagination, language, on-site search.
  • Passive parameters don’t change content — affiliate IDs, UTM tags, session IDs.

Both cause trouble. Passive parameters on internal links create duplicate URLs and waste crawl budget; active parameters (especially faceted filtering) can generate near-infinite URL combinations — a classic spider trap. Google’s own ecommerce guidance warns about exactly this: content getting missed, the same content crawled repeatedly, and the crawler thinking your site has infinite pages because a URL contains a continually changing value like a timestamp.

How to control them:

  • rel=canonical is the primary lever now — point variants at the clean URL. For optional variant parameters, Google recommends using “the URL with the query parameter omitted as the canonical URL.”
  • noindex where a parameter page genuinely shouldn’t be in the index.
  • robots.txt to keep bots out of clearly junk parameter spaces (but remember it controls crawling, not indexing).
  • And for tracking specifically: use analytics event tracking instead of URL parameters where you can — most analytics systems can record the data without bloating your URLs.

One historical note: Google’s old URL Parameters tool in Search Console was deprecated and removed in 2022. Canonical tags are the replacement.

What a clean URL looks like

Pulling it together, the target format:

  • Descriptive words, not numeric IDs
  • Lowercase
  • Hyphens between words
  • HTTPS
  • No unnecessary parameters
  • Reflects your site’s directory structure
  • Stable and permanent (URLs you won’t need to change)

Should you change your URLs? Almost never.

This is the most important practical takeaway. John Mueller, asked whether changing URLs for SEO helps: “Will it help the site? Very, very rarely… Will a change negatively affect the site for a while until it’s reprocessed? Probably.”

Justified reasons to change URLs are narrow: genuinely cryptic/unreadable URLs (example.com/p?=123), outdated references baked into the URL, or fixing a findability problem — not a cosmetic preference for shorter, cleaner, or more keyword-rich paths on URLs that already work. If a concrete defect does justify a change, do it as a real migration, not a spot fix: build a complete old-to-new URL mapping covering every affected path, put direct, permanent (301) redirects on each one (avoid redirect chains through an intermediate old URL), update internal links and canonical tags to point straight at the new URLs, update your XML sitemaps, and use the change-of-address tooling where it applies. Then monitor both the old and new URLs afterward — crawl stats, Search Console coverage, and server logs — rather than assuming the redirect map is complete because a few sample URLs worked. Solid redirect management reduces the risk of losing equity, but neither Google nor anyone else guarantees a recovery timeline or that rankings carry over unchanged. The permanence angle matters more than ever now that AI assistants cite URLs: broken-on-change links become broken citations.

Where this sits

URL structure overlaps with several neighbors in the website-structure and crawling worlds: canonicalization (the ~40 signals that pick a representative URL), URL parameters (the deep dive on active vs passive), trailing slash handling, site architecture and crawl depth (where click depth, not URL wording, does the real ranking work), and redirects (how you move URLs without losing equity). Each is its own deep dive.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin an expert quote first.