Free to explore: filter winning sites by DR, traffic and niche  ·  Try the live explorer →

URL structure for SEO: what matters

A browser address bar showing a clean URL

The best URL structure for SEO is the one a person can read, a crawler can follow without getting lost, and you never have to change. That is less exciting than the usual advice about keyword placement and folder depth, but it matches what Google actually documents.

The received wisdom treats the URL as a ranking lever: get the keyword in, keep it short, flatten the folders. Google’s own guidance treats it mostly as a usability and crawling issue. The difference decides whether a URL project is worth doing at all.

What Google’s guidance actually says

Google Search Central’s page on URL structure best practices is short and specific. These are its main points, in its own words where the wording matters:

Google’s guidancePreferAvoid
“Use readable words rather than long ID numbers in your URLs.”/guides/soil-testing//p?id=48213
“Use hyphens (-) instead of underscores (_) to separate words.”/soil-testing//soil_testing/
“Use words in your audience’s language in the URL.”Words your readers use; non-ASCII characters percent-encodedWords in a language your audience does not read
“Avoid the use of session IDs in URLs and consider using cookies instead.”Session state in cookies/shop/?sessionid=…
“Don’t use fragments to change the content of a page”A real URL per piece of content/#/products/boots

The example paths are illustrations on no particular site. The fragment rule is the one modern JavaScript sites break most often: Google says “Google Search generally doesn’t support URL fragments”, so content that only exists behind a # may never be seen as a separate page.

A long URL with parameters

Does URL structure matter for SEO rankings?

Less than the advice industry implies. Google’s SEO Starter Guide says keywords in the domain or URL path “alone have hardly any effect beyond appearing in breadcrumbs.” That is a direct contradiction of the idea that a keyword-rich slug is a meaningful ranking factor.

It still makes sense to use descriptive words, because a readable URL tells a searcher what they are about to click, and it shows up in the breadcrumb trail in results. But the benefit is to the human reading it, not to a ranking algorithm weighing the keyword.

A folder hierarchy diagram

Folder depth falls into the same category. A URL three folders deep is not penalised for its depth. What matters is how many clicks it takes to reach the page through internal links, which is a site architecture question, not a URL one. A flat URL on a page buried in the navigation is still buried.

The best URL structure for SEO, in practice

The pattern that works for most sites is simple: a short, stable folder for the content type, then a readable slug.

Permalink settings in a CMS

For the best permalink structure in a CMS, that usually means the post name, with or without a category folder. Avoid dates in blog URLs unless the content is genuinely date-bound: a date in the path makes an updated evergreen guide look stale and forces a URL change if you ever want to remove it. Avoid category folders if posts move between categories often, because each move becomes a URL change.

Keep slugs lowercase and consistent about trailing slashes. Neither is a ranking issue on its own, but mixed case and mixed slash styles create duplicate URLs that then need redirects or canonical tags to tidy up.

Multilingual sites need one more decision: where the language lives. A folder per language, such as /de/ and /fr/, keeps everything on one domain and makes the structure obvious at a glance. Whatever you choose, use words in each audience’s own language in the slug, as Google recommends, and percent-encode any non-ASCII characters, as its guidance specifies, rather than transliterating them awkwardly by hand.

Where URL structure really costs you: crawling

Google’s guidance spends most of its words on this. Overly complex URLs create “unnecessarily high numbers of URLs that point to identical or similar content.” The sources it names are faceted navigation, additive filtering and infinite spaces such as calendars that generate a page for every future date.

Faceted navigation filters on a shop

An online shop with filters for size, colour, brand and price can generate a URL for every combination, in every order. Each one is a page a crawler might fetch, and almost none of them is worth indexing. On a large site, that waste is where crawl budget becomes a genuine constraint rather than a theoretical one.

The fixes are structural: keep parameters in a consistent order, avoid creating crawlable links to filter combinations nobody searches for, and make sure the combinations you do want indexed have clean, stable URLs of their own.

Session IDs are the older version of the same problem. A visitor-specific parameter in the URL means every crawl can produce a fresh set of addresses for identical pages. Google’s advice to use cookies instead is the simplest fix on this list, and one of the few that is clearly worth changing on an existing site.

A hyphen versus underscore comparison

Should you change your existing URLs?

Usually not. This is where URL advice does the most damage. A site with underscores, ID numbers or dates in its URLs reads that guidance and plans a migration. But every changed URL needs a redirect, every internal link needs updating, and search engines have to recrawl and reprocess the new addresses. For a while, rankings can wobble.

Weigh that against the gain. If keywords in the path “alone have hardly any effect”, rewriting slugs to add them buys very little. Underscores instead of hyphens are worth avoiding on new pages, not worth migrating away from on old ones.

A URL redirect mapping sheet

The real exceptions are functional problems: session IDs in URLs, content only reachable through fragments, or a filter system generating vast numbers of crawlable duplicates. Those are worth fixing because they affect what gets crawled and indexed. If you do change URLs, map every old address to its new one and use permanent redirects; our comparison of 301 and 302 redirects covers which to use. Redirect each old URL straight to its final destination, not through intermediate steps.

One limitation is worth stating. Google’s guidance describes what it handles well, not how much each point weighs. Nobody can tell you that switching underscores to hyphens will move a ranking by any measurable amount, which is exactly why it is a poor reason to restructure a live site. Get the structure right for new sections and leave working URLs alone.

Frequently asked questions

What is the best URL structure for SEO?

Readable words separated by hyphens, in your audience’s language, under a short stable folder. No session IDs, and no content that only exists behind a fragment.

Do keywords in URLs help rankings?

Very little. Google’s SEO Starter Guide says keywords in the domain or URL path alone have hardly any effect beyond appearing in breadcrumbs.

Hyphens or underscores in URLs?

Google recommends hyphens to separate words. Use them on new pages, but do not migrate existing underscore URLs for that reason alone.

Should I change old URLs to improve SEO?

Usually not. The redirect and recrawl cost tends to outweigh the gain, unless the old URLs cause crawling problems such as session IDs or endless filter combinations.

The takeaway Use readable, hyphenated, stable URLs for new pages, control filter and parameter sprawl, and leave working URLs alone unless they cause a real crawling problem.