Underscores vs. Dashes

Update 6/10/09 – Video from Matt Cutts about the underscore vs. Dashes issue.

Spaces should never be used in a URL or file names because the space character gets translated to “%20” by the browser, and this can wreak havoc with both readability and statistics or analytics programs. The question then remains, which is better to use instead of spaces, underscores “_” or dashes “-“.

As far as Google is concerned Big_Oak consists of one word, “Big_Oak”, and Big-Oak consists of two words, “Big” and “Oak”.

The reason Google does not treat the underscore as a word separator is because Google was created by programmers who knew that programmers often wanted to search about programming. Many computer programming languages use the underscore character in such ways that CLASS is different from _CLASS.

Because of this, I always recommend using dashes instead of underscores in your filenames and URLs. Be careful not to use too many dashes in your domain name, as that could get your site flagged for other reasons. I prefer to have a domain name with no dashes, and to use dashes where appropriate in the directory and file structure.

Example URL:

Other things about Google to keep in mind when choosing filenames and URL structure.

  • There is no difference between lower-case and upper-case:
    big oak, Big Oak, BIG OAK, and biG Oak are all the same.
  • The ampersand “&” is a word seperator:
    Big&Oak is treated as two words.
  • Singular words are not the same as plural words:
    oak and oaks are treated as different words.
  • Google cannot read words that are within other words:
    bubble will not be seen inside of bubblegum.

As with any tip, keep in mind that it’s a combination of many factors which will ultimately decide your placement in the search engine rankings and quite often every little bit counts.


  1. Chris – Thanks for the tips on using “-“, “_” and “&” as well as upper and lower case. I learn something everyday – Thanks again.

  2. Chris, you mention that too many hyphens are not a good thing, and I agree. Most blog posts, including mine, have several hyphens but the search engines seem to still index and find the pages. Do you think there is any harm in blog URLs including hyphens?

  3. Steven,
    I wouldn’t worry about the number of hyphens in the blog post title or file names. I was warning against registering a domain name with too many hyphens. For example, making your domain name something like search-engine-optimization-seo-website-design-application-development-services.com is probably a very bad idea in many ways.

  4. I never completely understood why we use dashes instead of underscore. Now that I read your post, it really makes sense.

  5. Using a single hyphen or even a couple hyphens in a domain name is perfectly fine. If you have a domain name with 5 or more hyphens, then you could run into not only SEO problems, but usability problems as well.

    It’s my personal preference not to use hyphens in domain names, because it’s easier to tell some one, “Go to big oak inc dot com,” instead of saying, “Go to big hyphen oak hyphen inc dot com.”

  6. Simple but informing. This article just answered a questions I’ve had for weeks now. Thank you!
    I’ll continuing using dashes!

    – Jason

  7. Internet marketing is indeed very different from traditional marketing. In the field of internet marketing the webmaster uses all possible means for promotion just from the comfort of his small office or his bedroom.

  8. Hey this was really handy to know – my page titles are created automatically with ‘-‘ in wordpress and some of them are pretty long.. is there a rule of thumb to use about the number of dashes in a webpage name (concerned about your comment that you should not have too many dashes).

    I have a cartoon site and the names of the cartoon image files also contain dashes – I surfed a bit through your site but could not find any articles as to how to best optimise for these cartoon files for indexing under google images – it seems pretty random how things are getting into the index even though the naming conventions/ alt tags/ title tags etc are all handled consistently on the site! Any suggestions would be much much appreciated!



  1. Jadehat, the SEO consultant» Blog Archive » Speedlinking #1 - [...] finally, Chris Alexander makes a post on Big Oak SEO blog about hyphens-and_underscores. [...]