Underscores vs. dashes in URLs

By | August 11, 2019

MATT CUTTS: Hi, everybody. I wanted to give you an
update on underscores versus dashes in URLs. This is something that a lot of
people have asked me about. And I had talked about
it a long time ago. And so I figured it was
time for an update. So first, let me give a little
bit of history about why, whenever we see an underscore,
we join that in the URL rather than separate using that. So what I mean? Well, if you say red dash widget
in a URL, we view that dash as a separator. So we index the word red, and
we index the word widget. And those are separate. Whereas if you were to have War
of 1812 with underscores– so, war of 1812– instead of separating on the
underscores we actually glom all those together. So that’s one term that you
could find by searching for war underscore of
underscore 1812. Seems kind of weird. So why does Google
do it that way? Well, whenever we started,
AltaVista was huge. We were just this little
tiny company. And we were all very techie. Lots of computer programmers. And we wanted to find exactly
what we wanted as far as terms. We really cared
about precision. And so whenever you are a
programmer, you often have things like, if you’re a
C programmer, you might recognize TMP underscore MAX. And so, if you are a programmer,
you want to be able to search for that term and
find TMP underscore MAX– and that exact term. Not just TMP and MAX that happen
to be on the page. So it was because the original
engineers were programmers, and the programmers wanted
to be able to search for programming terms, that we
joined based on the underscore rather than having that
act as a separator. Now in practical terms, it
doesn’t make that much of a difference. It’s kind of what we call
a second order effect. It’s not a primary thing that
really makes a huge difference. For example, Wikipedia has a
lot of pages that say war underscore of underscore 1812. That doesn’t keep Wikipedia
from ranking. Because there’s page
rank, there’s proximity, there’s title. There’s all the other signals
that we use, over 200 of them. But if you are going
to make a site and you’re starting fresh– so you’ve got a blank
slate to work with– I would probably go ahead
and go with dashes. And I would continue to go with
dashes at least for the foreseeable future. We had thought about doing a
little project to split on underscores a few years ago. But it turns out the amount of
impact it has in our rankings is relatively low. And it turns out, to get
engineers to do that versus some other projects– there were other higher impact
projects that we could have them work on. So at least for the time being,
we still join on the underscore and separate
on the dash. So a few people had asked, you
were thinking about splitting on the underscore, do
you do that yet? The answer is no. I don’t know when we will. Nobody is slated to be
working on that. So at least for the time being,
it’s better to stick with a dash. Now if you already have a
website, if it already uses underscores, and if it already
works the way you want, don’t go back and rewrite
every single URL. I would only bother when it’s
a brand new website, when you’re really working
on something fresh. When you’re trying to say to
yourself, OK, I can do this anyway I want, then that’s
a pretty good time to go for dashes. If you’ve already made the
choice and you happen to use underscores, I really wouldn’t
worry about it that much. It’s not a huge factor. But I just wanted to explain a
little bit about the kinds of reasons why we would do that
in the first place and just give a little bit of context
and a little bit of update. So I hope that explains things
a little bit better. Thanks everybody.

70 thoughts on “Underscores vs. dashes in URLs

  1. Graham Sowerby Post author

    Good video Matt, I did think that was the case. Keep them coming.

  2. Ashley Sheridan Post author

    @polyglut Yeah I agree. It's terrible when a company has a service and then tells us how to make best use of it. It's as bad as those help pages for all the software on my computer. How dare they tell me how to use it, now other people are going to be more productive than me because they are reading the same docs.

  3. Grover Saunders Post author

    Let's be clear, this is a well made, helpful video. That said…

    So you're inherently disadvantaging any CMS that uses underscores in its URLs by indexing things in a confusing, arbitrary way because of a programming decision make over two decades ago. And since fixing it hasn't been a priority for over two decades, it probably never will be.

    Just making sure we're clear.

  4. Mark Warner Post author

    Could I suggest that you add an option in webmaster tools "split on underscore". By default this is off. So if you are one of the idiot "underscore" webmasters like me you can opt in.

    This should then mean that the project to split is really a lot simpler to implement in respect of checking for webwide impact etc.

    You'll be producing better quality results!

    Smart idea eh?



  5. sKIPper76M Post author


    There is also a usability problem with having underscores in URLs. Since URLs are generally displayed with an underline, an underscore in the URL could potentially get "lost" in the user's eyes. Thus, that underscore may be perceived as a space.

    This may be not be a problem if the user just needs to click on the URL (wherein the perception whether its an underscore or space doesn't matter), but it may be a problem in cases such as dictating the URL to a friend over a phone, etc.

  6. Zone23 Post author

    Понять бы в общих чертах, о чем говорит иностранец?

  7. Dave Natalie Post author

    I think they need to split for PascalCase as well, not sure if they do.

  8. Dan Sullivan Post author

    Mr. Cutts,
    Thank you for taking the time to explain what Google does with _ and -. However, I'm a Cuttlet who would rather see the _ used as a separator and joiner in the url. Index both. For years I've made pages with _ in the url for the same reason the original Google kids made _ a join operator. Because I write my code like that. I really only care about it in the url. My urls are helpful to the user's experience. A keyword in the url should be worth at least as much as in an H3 tag IMHO.

  9. Cristian Herrera Vasquez Post author

    Please Google, do not use _underscore as a separator, we have lost "define:" operator in searches and I still miss the time when I could search for strings in a back-trace and find relevant information that has helped find a solution..

  10. thundergr Post author

    underscores and dashed should be treated equally or else quality content may rank lower. you should fix it.

  11. DevHQLessons Post author

    No – it shouldn't be "fixed". Underscores are used for joining words together, whereas dashes are meant for separating them — these are the real word applications.

  12. Michael Muryn Post author

    The reason seems a bit biased. I don't know if I am convinced it is the "right" thing. And as a developer, I am very interested in doing "right" thing.

  13. Michael Muryn Post author

    If we talk about URL (and even in code), we do use underscore mostly as a word separator, don't we? The fact that both words are tight together is just another data about these value, and this rule should also apply to hyphens which is also used to "join words".

    Actually from what I read "dashes" and "hyphens" are different thing and people really type hyphens from what I understand. I repeat, hyphens are used to "join words".

  14. Michael Muryn Post author

    Idea to index the parts AND the sum (i.e. tmp, max, tmp_max for "tmp_max") is interesting.

    Idea to let the webmaster define how their website URL are defined are interesting for a "search engine" point of view (would prefer a global standard to define this, rather than Google only).

    I am sure, at least I hope, some people at Google have thought of these ideas already.

  15. Michael Muryn Post author

    I don't think people should adapt to Google, but Google should find way to get the most out of content about real usage (and it probably does on most point). People should however do the "right" thing, and that is where I would support Google, but then I have to be convinced it is the "right" thing. 😉

  16. thundergr Post author

    This is not the case on the web. See wikipedia for example. A search engine should be as accurate as possible. it should be fixed.

  17. guggelheim Post author

    Reasons why underscore is better than hyphen to separate words in friendly urls:
    1. It's much more readable
    2. "Nineteenth- and twentieth‑century writers" becomes "Nineteenth–and-twentieth‑century-writers". In some languages, fe. finnish the hyphens are used extensively to join words together. (see Wikipedia article for hyphen for more examples)

    Being a finn, I'm not too happy about Google forcing me to use the ugly hyphens.

  18. guggelheim Post author

    Oh, and Google itself uses underscores in its urls. What's that about?

  19. guggelheim Post author

    Lovely. I hope you understand that calling anyone retarded makes you sound like one. Unless of course you're thirteen years of age or under.

    It's simple really. With dashes you lose the possibility to revert a friendly url back to it's exact original form as the dash character gets a double meaning (it can be a space or a dash). With underscore you don't lose that information.

  20. 92idoo Post author


    What do you think about using underscores for words that come together and hyphens for separate words?



  21. adamsamgee Post author

    if I have to use hyphens, matt cutts needs to write in a straight line. deal?

  22. Digital Ad Agency / Adwords Consultants NYC LA San Francisco LONDON Post author

    I recommend just doing yoursite dot com/–_–.php

  23. Bug InSoup Post author

    why would I want to use _ when I can simply write twowordstogether?

  24. Brian Swanick Post author

    This should be a commandment for local businesses. Thank you to the wonderful person who created 301's…although if you use a CMS, you probably will never have this problem. Others. Just not this one.

  25. Andreas Belivanakis Post author

    Dashes instead of underscores is a no-brainer. The real question is, dashes, or no dashes? In other words, is redwidgets better than red-widgets?

    And does the correct answer (if there is one) depend on whether the dash or no dash term is in the domain itself, versus a folder or filename?

  26. Wynn Ryder Post author

    I found a way to make money online.
    Check This website Money94.Com
    I subscribe to the website and after 15 days using the System
    I will able to make at least $500 a month. Now i subscribed with this website
    For last three months and my current income is $2000 a month, by using the system part Time I am still attach to my current day job, But after I cross the income what i am currently earning with my day job i will quit my day job and Working with this system full time.

  27. Jake McGrew Post author

    Has this methodology or its impact in SEO ranking changed since 2011?

  28. Jake McGrew Post author

    Spammers bought many popular non-underscored and non-hyphenated domains and are reselling them at a huge ransom.

  29. methodinsane Post author

    How relevant is this info to google/seo in 2013?

  30. Adam Arnold Post author

    This old stuff is so much more informative than the videos you're putting out these days. Please bring back the good stuff 🙁

  31. 1Source SEO Houston Post author

    I was looking for the answer to which one was better UNDERSCORES vs DASHES and this video seemed to sum it up pretty quick. Matt indicates dashes are better but if you already have lots of URLS with underscores, don't bother to go back and change them. Thanks for the advice.

  32. Michael Muryn Post author

    Paradoxically with the historic reason, lot of developers are used to use underscore to separate keyword, so it is/was more likely that they use the same pattern to name their resource/filename.

    However, with all the SEO talk, hyphen gained the popularity contest. Without that, we would see more underscore in URLs. Only potential valid reason for hyphen would be that it is easier to type/read for non-techy (?)

  33. Michael Muryn Post author

    Keep in mind that it is the search engines that should adapt to find good websites and not otherwise. Do thing right and they should find you.

    Of course in practice, we cannot wait for Google to fix their low-priority tasks and we want to take advantage of every tiny bit of SEO.

  34. Spook SEO Post author

    Thanks Matt for the valuable instruction!!! Although dashes in the URls play a crucial role in the SEO prospect, it’s not recommended for the sites already have indexed on search engine. However, use dashes instead of underscores for new sites for better ranking impact.

  35. Cyprus Homebuilders Post author

    Thanks Matt! It's a very valuable piece of information for my company as I am working very hard at the moment on making our site visible to the right target audience. I do have a question though an answer to which I cannot seem to find anywhere.

    When forming URLs for pages, does it make any difference if I use/do not use prepositions and other form words? For example, what would you say looking at:
    mydomain.com/teach-your-child-to-swim-in-a-pool vs. mydomain.com/teach-child-swim-pool

  36. Thomas Wong Post author

    Spook, Matt is trying to explain the different uses of hyphens and underscores, they both have specific uses. Use hyphen if you want to increase the number of keyword derivatives that the page can appear, and underscores to set specific keyword combinations.
    Besides that, Google doesn't want you thinking about increasing rankings, it wants you to increase the value and relevance of information on your site. 

  37. Lynne Kronholm Post author

    I have links to my site with both www prefix and without. Does google count both address as one and should domain www or Not to www ?

  38. Matthew Jenkins Post author

    Hey wait, are you the same Matt Cutts from this article?
    Can you make up your mind already?

  39. MikeEwe66 Post author

    No mention of RFC 952?
    Does that RFC not specify that hostnames can only contain letters, numbers, the minus sign and dots? http://www.ietf.org/rfc/rfc952.txt

    RFC 1123 added the option of an initial digit, but did not mention allowing underscores. http://www.ietf.org/rfc/rfc1123.txt

    Sadly, RFC 1178 (Choosing a name for your computer) does not mention RFC 952 or RFC 1123 or underscores.

  40. Dean Cera Post author

    thank you of the film;
    had build about 40 websites with _ underscores_ years ago because that was the standard (learned method) and found out now that – dashes – separates the words. So I went back to change the sites with – dashes – and found my self in front of a lot of work; 1000s and 1000s of pages.
    Leave it alone and spend your time on new pages and/or sites and not to risk the contamination of those sites that are already built; use dashes for your future site work.
    PS If you have html pages that are important to the site; then spend the time but beware you my lose 100s of links.
         Back up the site to a separate hard drive before you attempt to do this.

  41. spifswaps Post author

    What if you don't use a hypen or an underscore? Is that bad?

  42. Md Mahamodul Hasan Post author

    Hello matt ,my site's URL was my_site_example_example/65656 ,like that and now my developer fix it and now it is site-example-example/65656 ……. so is there any problem to index by Google or any crawl problem ??

  43. eXtressIT Lotta Gustafsson Post author

    THIS ALSO EFFECTS SEARCHING IN GOOGLE APPS DRIVE! FILES WITH UNDERSCORE DOES NOT APPEAR IN THE SEARCH RESULT. Funny though they appear in Autocomplete but not later in the searchs result list. This is very disturbing and I cannot find any information that it will com a change and now we are writing 26 August 2015!

  44. Tom Stagg Post author

    I'm sorry but this needs to be fixed. Example: If I have two files in Google Drive: keyword-test and keyword_test. If I search for term "keyword" then I only get the keyword-test file back. I can never find the keyword_test file. For Google, a search company, this is pretty bad.

  45. Jamil Gotcher Post author

    When Matts says it's a word separator does he mean that the hyphens do NOT or DO string a search phrase together? I"m hoping the answer is DO. Example: Idaho-Potatoes If someone searches Idaho Potatoes will my hyphenated example be good for search ranking? Does Google rank Idaho separate and Potatoes separate as an unrelated search phrase if /Idaho-Potatoes used in the url?

  46. Bray Outdoor Ads Post author

    Does anyone know what the best practice is for County and City-Specific website pages?
    Example 1: www.brayoutdoor.com/los-angeles (which is what we currently use)
    Example 2: www.brayoutdoor.com/losangeles (without the DASH)

  47. alok ranjan Post author

    i am not agree matt. (_)Underscore or (-)dash doesn't matter for wikipedia because wikipedia quality matter ok plz learn more matt cutt

  48. Hello Kitty Post author

    Could you tell me please, will it be good or bad if i'll redirect urls with underscore to urls with -dashes-?

  49. tofuComputer Post author

    It's February of 2019 as I write this comment. Is this actually still true? Any updates on this? (And my two cents: this is humans bending to technology, not technology serving humans. Not good nor reasonable)

  50. Saba Elahi Post author

    Anybody knows if this is still the case in 2019?? Any update on this? Thank you

  51. Catatan Si Rebiaz Post author

    Actually I am very curious, what does "underscores and dashes" mean in the YouTube video

    sometimes I get links without underscores or dashes on the videos that I uploaded … sometimes I have 1 underscore … 2 underscores, or a combination of them


Leave a Reply

Your email address will not be published. Required fields are marked *