Facebook Pixel
Join our Facebook Community

Dashes vs. underscores in SEO

Posted By Darren Rowse 26th of August 2005 Search Engine Optimization 0 Comments

I regularly get asked whether dashes or underscores in URLs are better for search engine optimization.

ie which of the following is best – www.problogger.net/is-this-better or www.problogger.net/is_this_better ?

For the past six or so months I’ve leant towards dashes instead of underscores – but it’s always been a ‘best guess’. Today in reading Matt Cutt’s blog I think I’ve made a good decision as he writes ‘I often get asked whether I’d recommend dashes or underscores for words in urls. For urls in Google, I would recommend using dashes.’

He goes on to explain why – but I think you’ve already got the answer. For Google Dashes are best.

About Darren Rowse
Darren Rowse is the founder and editor of ProBlogger Blog Tips and Digital Photography School. Learn more about him here and connect with him on Twitter, Facebook and LinkedIn.
  1. I’ve got to agree with this.

    When I started my SEO plans a while ago, I read here (thanks Darren) plus on a few of the major SEO forums that dashes was the way forward. When I started to rebuild my site, I used dashes in all the urls, where previously I had used underscores. I now find that the pages are getting indexed, which I am partially putting down to this naming structure.

    Not conclusive proof, but enough for me to be convinced that it works.

  2. here’s proof of your theory:
    search engine friendly 11,600,000 Google results
    search-engine-friendly 768,000 Google results
    search_engine_friendly 170 Google results

    Google treats the “-” as a ‘wildcard’ where the “_” is treated like any other character and must have a hard match. Therefore if you use “_” in your urls you will only benefit from url SEO if the person searches with “_” in their query.

  3. For human beings, dashes are best, too. Try explaining “underscore” to someone who isn’t familiar with a keyboard. It’s bad enough when they say “what’s a hyphen?”

  4. What about periods? I tend to using periods over dashes:

    search.engine.friendly 757,000 Google results.

    Is it better or worse? I’m not sure but I’ve always been using it.

  5. As a developer, I don’t see why it would be difficult for google to simply use one or two lines of code in their algorithm to account for this. I think it’s simply a function of people using dashes more than the underscore as well as it being slightly more easier to type.

    I believe personally that the greater number of search results is simply that more people use dashes than under scores.

    I don’t think there is a technical argument, but an aesthetic and logistical one absolutely. Dashes to me simply look better.

  6. “I believe personally that the greater number of search results is simply that more people use dashes than under scores.”

    If this were true then the number of results would be about the same. Don’t forget the real question is:
    will Google match search_engine_friendly to search engine friendly. Clearly Google does not, while search-engine-friendly and search.engine.friendly have a better chance of matching.
    Even “search engine friendly” turns up 775,000 matches, so clearly the “_” is counted only in exact match situations.

  7. Interesting. Unlike some of the others who’ve left comments, I prefer reading URLs that use underscores because I feel they leave less visual ‘noise’ between items. To me, search_engine_friendly is easier to read than search-engine-friendly.

    Of course, my preference is probably related to the fact that I’ve coded html and css like this for a couple of years… And I’m not a search engine bot…

  8. This is really bad news for Movable Type users.

  9. very true IO Error – although its not the end of MT blogs. I have a couple with underscores which do pretty well with underscores.

  10. Is it not possible to use a mod rewrite command in an .htaccess file to swap underscores for hyphens or dashes? And would this process have any bearing on a site’s SEO?

  11. i suspect you’d loose all your ranking if this happened….not really sure on the technicalities of it but I’m not sure I’d risk trying to change my URL structure on an established site – might be ok on a new one though.

  12. […] Problogger Darren posted an entry resolving whether dashes or underscores are better for file name structure which referenced Matt Cutt’s comments on the topic. The conclusion was that dashes make for better file naming, at least for Google SERPs. […]

  13. To me it really makes no difference. I seem to do pretty damn well on some sites with underscores. Google has been around long enough to get over this stuff. It’s definitely not the end all be all of SEO.

    Maybe if

    – incoming links were the same
    – weight of incoming links were the same
    – same page SEO
    – same PR of page

    and about 20 other things then you can worry about dashes/underscores. Google’s and every other search engine’s focus is on the page and the code, not really the filename of the page.

    But I guess it doesn’t hurt to default to dashes.

  14. If you omit the dashes, underscore and even periods .. and just type words without spacing ..

    SearchEngineFriendly … gets 785 Google Searches

    It says: “Did You Mean .. Search Engine Friendly?”

    What’s up with that?

  15. Why should that even matter?

  16. Your search for “search engine friendly” really doesn’t say how Google looks at URL’s. It just says how Google differentiates the use of the hyphens in a Search. It is a decent indicator of how Google might see it. That said I do agree that hyphens are better in the URL. They seem to be treated as a space where an underscore is not.

    In all actuallity the URL is given little weight in the search engine algo. URLs with a few variables in them can rank better than a search-engine-friendly.htm page. But as for those who would like to edge up a notch or two in the serps, it could put you above a competitors page that would otherwise be ranked equal or above yours. So I am for all the possible advantages I can get.

  17. […] Here’s an article by Matt Cutts (found through ProBlogger) that explain, in a few but informative words, why it’s best to use dashes rather than underscores in your URLs, at least when it comes to Google: With underscores, Google’s programmer roots are showing. Lots of computer programming languages have stuff like _MAXINT, which may be different than MAXINT. So if you have a url like word1_word2, Google will only return that page if the user searches for word1_word2 (which almost never happens). If you have a url like word1-word2, that page can be returned for the searches word1, word2, and even “word1 word2″. […]

  18. Underscores are rather unnatural characters, but it’s easier to read something with underscores in.

    It isn’t easier to type something with underscores in, however.

    I’ve always wanted to know if you can simply mash the words together, but I suppose that isn’t too great an idea.


    Seems hyphens are the nicer answer.

  19. As far as SEO, goes, the word from Mr. Cutts should say all that is needed.

    Underscores have disadvantages in usability that weren’t really touched on here. If text is underlined the underscores, of course, disappear, and a live user can’t easily tell that there are underscores between the words. Also, when I worked for a US government agency a few years ago, I had some web application software developed. The developer used a lot of underscores in links. When the system was ready to go ‘live’ on a government server rather than the developer’s machine, all sorts of things broke. The answer, from the network administrator involved who ‘owned’ the server and therefore had to be obeyed was a lecture on the illegality of underscores in URLs, and how he had his web servers set to reject such ‘bad’ code.

    Best regards

    Now the underscore _is_ perfectly legal, but it surely gets little respect.. After that fiasco I avoid them in any URLs I write or any that I pay others to write.

  20. Try using the allinurl: search prefix in Google. You’ll see that a search for “allinurl: bar” would return pages like


    but it would not return pages like


    I ran into this while doing some testing to see if Google had removed some pages from their index that we have deleted from our site. I found that I could not find the counts for some types of pages (all with a common suffix), because we were using underscores.

  21. Google gave us an official answer to this serveral months ago. I think it was from GoogleGuy, or some other source. Google definitively said dashes are better.

  22. What about periods?


    Are periods treated as wildcards via Google? I would assume so, as they have to parse out the .html’s, .htm’s, etc.

  23. this is very useful tip. Thanx for that

  24. […] This post at ProBlogger was written the day after Matt Cutt’s post and sparked a lot of comments from ProBlogger’s big readerbase.  Yet this post resides on page 2 of Googles results for “dashes vs underscores”?  Odd. […]

A Practical Podcast… to Help You Build a Better Blog

The ProBlogger Podcast

A Practical Podcast…