Limited: Free $2,500 growth audit for the next 8 businesses — claim yours →
← All articles SEO

Dashes vs underscores in URLs: which one Google prefers (and why it matters)

Google reads dashes as spaces between words and underscores as nothing — so "seo_friendly_url" becomes one unreadable word. Here's why dashes win for SEO, how to fix existing underscore URLs safely, and the URL rules we follow.

Shuey Shujab
Founder & Head of Growth, Whitehat Agency
· 27 May 2024 · 7 min read
Dashes versus underscores in URLs for SEO — Whitehat Agency

Use dashes, not underscores, in your URLs. Google reads a dash (hyphen) as a space between words, so "seo-friendly-url" is understood as "seo friendly url". It reads an underscore as nothing, so "seo_friendly_url" becomes the single unreadable word "seofriendlyurl" — and your keywords lose their meaning. It's a small detail with a real effect, and one we standardise across every SEO project.

This is one of those quiet technical choices that's easy to get wrong and easy to fix. Here's exactly why dashes win, how to correct existing underscore URLs without losing rankings, and the wider URL rules worth following.

The short answer

Dashes separate words; underscores glue them together. Google treats them differently, so for clean, keyword-readable URLs the answer is always dashes.

The short answer

In the dashes-versus-underscores debate, dashes are the clear winner for SEO. They separate words so search engines read each one, they're more readable for people, and they're the long-standing industry standard. Underscores look fine to a human but tell Google to merge words together — which is rarely what you want. If you're starting fresh, use dashes and don't look back.

Why URL structure matters

Before the specific choice, it's worth knowing why URLs matter at all. A URL is part of your site's structure and shapes how search engines index and rank pages. A clean, logical URL does three things:

  • Improves crawlability. Search engines use URLs to discover and understand content. A clear structure makes it easier for them to crawl your site — part of the wider technical SEO that keeps you visible.
  • Helps users. Readable URLs are easier to understand, remember and trust, which can lift click-through from the results page.
  • Reinforces keyword relevance. Including relevant terms in the URL helps Google understand the page's topic — but only if it can read the words, which is where dashes come in.

Dashes vs underscores

The difference is entirely about how search engines interpret each character.

  • Dashes are read as word separators. Google interprets "seo-friendly-url" as three distinct words, so your keywords register. Dashes also keep URLs readable and are the industry standard.
  • Underscores are not. Google reads "seo_friendly_url" as one word, "seofriendlyurl", which kills the keyword relevance and can be mistaken for a space in underlined links.
  • Don't overdo dashes. A handful is fine; a long chain of them looks cluttered and spammy. Keep URLs short and meaningful.
"

An underscore tells Google your words are one word. A dash tells it they're separate. That single difference is the whole debate.

— Whitehat SEO playbook

Fixing existing underscore URLs

If your site already uses underscores, don't panic and don't rip everything up overnight. Take a measured approach so you keep the SEO value you've built.

  • Prioritise by impact. Change the URLs of your most important pages first — the ones you most want to rank — rather than every page at once.
  • Use 301 redirects. Redirect each old underscore URL to its new dashed version. A 301 sends users and search engines to the right page and preserves the SEO value of the original.
  • Move gradually. Roll the changes out in stages rather than all at once, to avoid confusing search engines and users.
  • Test and monitor. Watch your analytics after each change, track any ranking movement, and adjust as needed.
Worried your URL structure is holding you back?

We'll audit your site's technical foundations for free.

A senior strategist reviews your URLs, structure and indexing, then hands you a prioritised fix list — yours to keep, whether or not you work with us.

Free Claim your free audit

URL best practices

Whichever separator a legacy site uses, these rules make any URL more SEO-friendly going forward.

  • Keep it short and simple. Shorter URLs are easier to read, remember and share. Describe the page concisely and cut unnecessary words.
  • Use lowercase letters. URLs can be case-sensitive, so sticking to lowercase avoids accidental duplicate-content issues.
  • Skip stop words. Words like "and", "the" and "of" rarely add value and just lengthen the URL. Leave them out.
  • Use hyphens as separators. As covered, dashes beat underscores and spaces every time.
  • Build a logical hierarchy. Organise URLs to reflect your site structure, using categories and subcategories so the path itself makes sense.
  • Don't keyword-stuff. Include keywords, but don't cram them in — overloaded URLs look spammy and work against you.

A well-structured URL is a small but genuine contributor to SEO. Choose dashes, keep URLs clean and logical, and you make every page a little easier for both search engines and people to work with — the kind of detail that compounds across a site, as our case studies show.

Frequently asked questions

Should I use dashes or underscores in URLs?

Use dashes. Google reads a dash as a space between words, so "seo-friendly-url" is understood as three separate words and your keywords register. It reads an underscore as nothing, merging "seo_friendly_url" into the single unreadable word "seofriendlyurl". Dashes are more readable and the long-standing SEO standard.

Do underscores in URLs hurt SEO?

They can. Underscores tell Google to join words together rather than treat them as separate, which weakens the keyword relevance of your URL. They're also harder to read, especially in underlined links where they can be mistaken for spaces. Dashes avoid both problems, which is why they're recommended.

How do I change underscore URLs to dashes safely?

Prioritise your most important pages first, then use 301 redirects from each old underscore URL to its new dashed version so users and search engines land on the right page and the SEO value transfers. Roll changes out gradually rather than all at once, and monitor your analytics for any ranking movement.

What makes a URL SEO-friendly?

An SEO-friendly URL is short and descriptive, uses lowercase letters, separates words with dashes, omits stop words like "and" and "the", follows a logical hierarchy that reflects your site structure, and includes relevant keywords without stuffing them. Together these make the URL easy for both search engines and people to read.

Written by
Shuey Shujab
Founder & Head of Growth, Whitehat Agency

Shuey founded Whitehat in 2013 on one rule: white-hat only. Thirteen years and $650M+ in attributed client revenue later, the rule still holds. He writes about SEO, AI search, paid media and the unglamorous work that compounds.

Claim your free audit