Underscores vs. Dashes – SEO Tip

Written on June 15, 2007 – 3:58 pm | by Shell Harris |

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:
http://www.bigoakinc.com/blog/category/52-seo-strategies/

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.

Update: A Test

I created a test page to illustrate how Google reads words.

Examples:

A search for Test_travveran shows the sample page.

A search for Flibstopper Test shows the sample page. The two words are even highlighted in the URL. The word “test” appears in the page title.

A search for travveran shows no results in Google. Google did not read my made-up word from the URL or content because it only appeared in phrases with underscores.

A site search for choosing colors shows all the pages in our Out on a Limb section because those two words appear in the navigation on all pages.

A site search for “choosing colors” (in quotes) shows no pages because those two words do not appear together in our site, choosing_colors on the test page is treated as a single word.

A site search for “the blue pill” (in quotes) shows our test page since dashes are treated as word separators.

A site search for “bush seo” (in quotes) shows our test page since the ampersand “&” also acts as a word separator.

Similarly Google can find the page with reality tv and bubblegum, but it cannot find the page with bubble or 1971.

Even though many of the stranger examples have little relevance to SEO, it’s a good idea to understand how Google reads and understands words.

Shell Harris co-founded Big Oak on January 1, 2004. In a previous career he was a print & web designer and often developed the sites he designed before focusing on his current passion for search engine optimization and Internet marketing. He is an avid researcher, SEO specialist, company mouthpiece and is always looking for the next big thing in Internet Marketing.

Facebook Twitter LinkedIn Google+  

  1. 12 Responses to “Underscores vs. Dashes – SEO Tip”

  2. By MorganLighter on Jun 16, 2007 | Reply

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

  3. By Steven on Jun 22, 2007 | Reply

    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?

  4. By Chris Alexander on Jun 25, 2007 | Reply

    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.

  5. By Francisco Cheng on Jun 29, 2007 | Reply

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

  6. By Wordpress Advice on Jul 9, 2007 | Reply

    Two Thumbs up. You made me a fan. I guess I have to read the rest of your advice for the last size months.

  7. By Wordpress Advice on Jul 10, 2007 | Reply

    I must ask why having a hyphen in your domain name is a bad idea, while it is not bad for filenames. I heard this from others as well. I have a single hyphen in my domain name. Is that bad ? or you just consider having more then one as bad ?

  8. By Chris Alexander on Jul 10, 2007 | Reply

    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.”

  9. By Jason on Oct 31, 2008 | Reply

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

    - Jason

  10. By Jeff Paul Internet Millions on Feb 17, 2009 | Reply

    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.

  11. By Wonkie Cartoons on Apr 25, 2009 | Reply

    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!

    Thanks

  12. By Tim Acheson on Aug 10, 2009 | Reply

    Having devoted considerable time to this question during my career, particularly in recent years, I can only conclude that dashes are not the best delimiter. Moreover, I believe a consensus will emerge eventually with an alternative character being used universally — probably the underscore:-

    http://www.timacheson.com/Blog/2009/aug/friendly_url_should_not_use_dashes_to_represent_spaces

  1. 1 Trackback(s)

  2. Jul 27, 2008: Jadehat, the SEO consultant» Blog Archive » Speedlinking #1

Sorry, comments for this entry are closed at this time.

Big Oak SEO Blog

This SEO blog is provided by Big Oak SEO, a SEO Company. Most blog posts are related to search engine optimization, short reviews, SEO tips and increasing site conversions. Email us at contact@bigoakinc.com or give us a call 804-741-6776 to see how we can help your company. More

Want to know what Shell is doing?
Follow Shell with Twitter, just don't expect too much.

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:    
Enter your email address:  
Find entries :