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 #6 in Website Structure#71 in Technical SEO#95 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 structureURL structure is how the parts of a web address — scheme, domain, path, query string, and fragment — are organized and formatted. It mostly affects crawling, usability, and how engines understand a page, not rankings directly. is mostly a crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor. and comprehension concern, not a ranking lever. Keywords in URLs are a “very light weight” signal that fades once a page is indexedStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed.. 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 HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'. HTTP vs HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' is a canonicalizationHow search engines pick one canonical URL among duplicates and consolidate signals onto it. 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 stringThe `?key=value` data tacked onto the end of a URL after a question mark — used for tracking, sessions, filtering, sorting, and search — and one of the biggest sources of duplicate URLs and wasted crawling in SEO.?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 breadcrumbsBreadcrumbs are a secondary navigation trail (Home > Category > Page) that shows where a page sits in a site's hierarchy. They create internal links that pass PageRank, and when marked up with BreadcrumbList structured data they can drive the path Google shows in desktop search results..” 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 depthCrawl depth usually means click depth — how many clicks it takes to reach a page from the homepage by following internal links. It can also mean a crawler setting that limits how many levels deep a crawl goes before it stops. — how many clicks from the homepage a page sits. Logical directory structure helps GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. estimate crawl frequency (a /policies/ folder rarely changes; /promotions/ changes often), but that’s about crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor., 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 canonicalizationHow search engines pick one canonical URL among duplicates and consolidate signals onto it. signals Google uses, alongside HTTPS preference, www vs non-www, trailing slashA trailing slash is the forward slash (/) at the end of a URL — example.com/page/ versus example.com/page. Except at the bare root domain, the two versions are different URLs to search engines, so you pick one format and enforce it., 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 contentThe same or very similar primary content reachable at more than one URL. There's no general duplicate content penalty — the real costs are possible signal dilution, the wrong URL getting chosen, and less-efficient crawling.. 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, redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't., or 404 depends on your server and application config — it’s not a universal rule. Test the actual responses (curl -I or a crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index.) 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 linksAn internal link is a hyperlink from one page on a website to another page on the same website. Internal links help search engines discover your pages and pass ranking signals (PageRank and anchor-text context) between them. 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, paginationPagination splits a large set of content — product listings, blog archives, search results — across multiple sequentially numbered URLs. For SEO, each paginated page should be crawlable, indexable, and self-canonical; Google no longer uses rel=prev/next, but Bing still does., 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 budgetThe number of URLs an engine will crawl in a timeframe.; active parameters (especially faceted filtering) can generate near-infinite URL combinations — a classic spider trapA spider trap (also called a crawler trap) is a site structure that generates an effectively infinite number of URLs — from faceted filters, calendars, session IDs, or redirect loops — so crawlers waste their budget on low-value, near-duplicate pages instead of your real content.. 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 indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed.).
  • 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 ParametersThe `?key=value` data tacked onto the end of a URL after a question mark — used for tracking, sessions, filtering, sorting, and search — and one of the biggest sources of duplicate URLs and wasted crawling in SEO. tool in Search ConsoleGoogle's free tool for monitoring crawling, indexing, and search performance. was deprecated and removed in 2022. Canonical tagsA rel=\"canonical\" annotation — in the HTML <head> or an HTTP Link header — that tells search engines which URL is the preferred version of duplicate or near-duplicate content. 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 chainsA → B → C instead of A → C. Each hop loses link equity and adds latency. through an intermediate old URL), update internal links and canonical tags to point straight at the new URLs, update your XML sitemapsAn XML sitemap is a UTF-8 file listing the canonical URLs on your site (with optional lastmod) so search engines can discover and prioritize them. It's a discovery and diagnostic aid, not a guarantee of indexing — and Google ignores its priority and changefreq tags., 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.

TIP Validate the redirect map before a URL change ships

A spot-check can expose chains, loops, broken destinations, and query-string changes. For a full migration, test the complete old-URL inventory rather than assuming one successful example proves the map.

Trace representative old URLs with my free Redirect Checker Free

  1. Sample old URLs across templates, folders, parameters, and traffic tiers.
  2. Confirm each reaches the intended final HTTPS and preferred-host URL without an intermediate hop.
  3. Fix the redirect map, rerun failures, and update internal links and sitemaps to the final URLs.

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 architectureSite architecture is how a website's pages are organized, categorized, and interlinked. It controls how crawlers discover pages, how link equity flows, and how clearly search engines understand each page's topical context. Silo structure, hub and spoke, and topic clusters are the three common models. and crawl depthCrawl depth usually means click depth — how many clicks it takes to reach a page from the homepage by following internal links. It can also mean a crawler setting that limits how many levels deep a crawl goes before it stops. (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 a quote first.