Dashes vs. underscores

August 25, 2005

in Google/SEO

I often get asked whether I’d recommend dashes or underscores for words in urls. For urls in Google, I would recommend using dashes. Why? To find out, let’s take a trip in the Google Time Machine. Set the dial for 1999, the year Matt first discovered Google. Matt was using, I dunno, maybe HotBot at that point? The curtain rises:

Matt: Hmm, this search for [FTP_BINARY] didn’t turn out the way I wanted. I got a couple scuzzy looking urls, and the other documents just have the words “FTP” and “BINARY” but the term “FTP_BINARY” doesn’t actually appear. (Note: Matt was a bit of a nerd, as you can tell.)
Some Random Person That I Don’t Remember: Have you tried Google?
Matt: What’s that?
SROTIDR: It’s a search engine written by nerds for nerds! They index numbers! Sometimes they even index punctuation, like “C++”. Try your underscore search there.
Matt: Okay, here goes. Whoa! They actually return pages with the literal string “FTP_BINARY”! That’s wicked cool! (Did I mention Matt was a nerd? Big-time nerd.)
SROTIDR: Yeah. The wild thing is that they wrote a paper about how they crawl the web and rank pages.
Matt: Well, now that’s just silly. I wonder why they didn’t keep it a secret? I bet those papers will make great reading for my information retrieval class.

I’ve stylized the conversation quite a bit, but I remember how impressed I was that Google indexed numbers and some punctuation (come to think of it, search engines have come a long way in five years). 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″.

That’s why I would always choose dashes instead of underscores. To answer a common question, Google doesn’t algorithmically penalize for dashes in the url. Of course I can only speak for Google, not other search engines. And bear in mind that if your domain looks like www.buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com, that may still attract attention for other reasons. :)

{ 191 comments… read them below or add one }

rob August 25, 2005 at 1:42 am

Good job Monsieur Cutts!

I like posts like these.

The world needs more of this kinda thing, there is indeed a lot of old twaddle out there about all sorts of stuff relating to search engines.

The more the better, in my book… ( not the twaddle).

PhilC August 25, 2005 at 7:07 am

A simple way of seeing that underscores are not treated as spaces is to type a phrase into the searchbox, but with 2 words joined together by an underscore. Do the search and look at the “Results 1 – 10 of about …” bit. Each identified, non-stopword, word is linked to a definition, but not the pair that are joined by an underscore.

It’s not nearly as interesting as a trip in the Google time machine, but it’s a lot plainer ;)

PhilC August 25, 2005 at 7:18 am

Incidentally, those “definition” links are an excellent part of the serps. I sometimes search on a word just to get that link. I did it a few of days to find out what you were all talking about by “obfuscating” javascript. Why on earth don’t you “obscure” it like everyone else does? And it’s a lot easier to say :?

Amish August 25, 2005 at 8:36 am

I always knew dash is better than underscore but never tried to know the logic behind …. Thanks :)

Marcel Marchon August 25, 2005 at 8:39 am

What about forward-slashes? Will these be considered word-separators as well?

DigitalGhost August 25, 2005 at 8:43 am

>>If you have a url like word1-word2, that page can be returned for the searches word1, word2, and even “word1 word2″

And that helps relevance how? ;) If I have a page apple_cider_press perhaps I don’t want traffic from just keyword apples, keyword cider, and definitely not keyword press. In any event, if it’s down to the URL for the deciding bit on whether that page shows up in the SERPS, I haven’t done my job well.

>>So if you have a url like word1_word2, Google will only return that page if the user searches for word1_word2

Bah, I can have a page word1_word2 entitled word3 word4, and if my anchor text and inbound anchor text, headers, etc are word3 word4 the page will rank for word3 word4. Say like a search “local news” sans quotes turns up bizjournals.com No local or news in bizjournal’s URL. Local shows up three times on the page and news seven or eight.

So I would content that URLs have little to do with whether a page shows up in the SERPs or not. ;) I’d much rather see a page with the URL of ‘fruit” than say, apples-oranges-bananas-melons.htm

In as much as short URLs are better URLs, wouldn’t you prefer to see URLs without dashes and underscores altogether?

Marcel Marchon August 25, 2005 at 8:43 am

Oh, and PS. – what if there’s a “word” that actually contains a dash? This sometimes occurs in things like type designations, etc.

Things like this: http://www.google.com/search?hl=en&q=mp36ph-3c

detlev August 25, 2005 at 8:46 am

To paraphrase another popular engine, “we’ve noticed quality drops off pretty quickly after two or three hyphens are found in domain names.” There’s no explicit admittance of penalty here, but such a strong inference should be understood to mean: avoid lengthy hyphenated keyword domains. It also might be good to limit lengthy keyword-driven file names, although popular blog software automatically does this to article postings. The key is moderation.

-d

Techweenie T August 25, 2005 at 9:02 am

How dare you impugn the honor of my site! You’ll be hearing from my fantasy lawyers.

spammaster@www.buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com

Vic August 25, 2005 at 9:48 am

LMAO at that domain name at the end. :-)

Markus August 25, 2005 at 9:52 am

If 90% of the pages on a given site contain – in the url and there are more then 10,000 pages the chance that it isn’t a huge spam site are next to 0. Now if all that is true and If the site has a huge rectangle adsense ad on every page the chance its a scapper site is even closer to 100%.

Natasha Robinson August 25, 2005 at 10:00 am

Matt,

Thank you for putting an end to this question as far as Google is concerned. Now I’m off to purchase: http://www.free-loan-mortage-hot-chicks.com

PS: Thanks for making your blog entertaining – at least for us nerds that is!

Have a great day,
Natasha “That Girl From Marketing” Robinson

Frank Johnson August 25, 2005 at 10:36 am

Hi Matt. Love your blog so far!

I’m not sure I get what you’re saying here. I have a website which often uses underscores in its urls (because that’s the way the backend CMS is currently set up, although I could change it). Here’s an example page:

http://(snipped for brevity)/spirit_west_coast/

If I go to Google and use this query:

“spirit west coast” “santa cruz”

that page on my site is returned as the second listing. The only reference to “spirit west coast” in the url has underscores. I presume the page is returned for the search on the phrase without underscores because the article’s title is exactly that – “spirit west coast” (without underscores).

Am I right, then, that if a page has a url with phrase_one in it, but “phrase one” does _not_ appear on the text of the page (in general), then that url won’t be returned for a search on “phrase one” – only for a search on “phrase_one”?

Is that what you’re saying? If that’s true, then in my specific case, it probably won’t matter because the string that ends up in the url is always in the text of the page as the title of an article (that’s the way the backend CMS I’m using works).

Just trying to clarify.

Thanks much!

Chris August 25, 2005 at 11:32 am

I always thought this was one of the stupidest things Google has done.

Firstly, if you’re looking for a literal underscore, why not use quotation marks around your search term? Shouldn’t the smart computer nerds know to do this?

Furthermore, an underscore has always stood as the replacement for a space in text formats where spaces were not possible. This is because an underscore has no grammatical use, whereas a hyphen does. This convention precedes Google, and the Web in general.

For instance, consider the quandry of Catherine Zeta-Jones

If you are to use hyphens to represent spaces in her name you would write it Catherine-Zeta-Jones. This is ambiguos as the viewer cannot tell if she hyphenates her last name, or if the hyphens are merely space replacement.

If you wrote it Catherine_Zeta-Jones it’d be obvious that her last name is hyphenated.

This is but one example, there are many other. So by the nature of the grammatical significance of a hyphen it will never be as good of a space substitute as an underscore. Using hyphens was not a stroke of genius on Google’s part, but rather a rare example of shortsightedness that has been encouraging a step backwards in Internet usability.

René August 25, 2005 at 12:16 pm

Matt, when you’re ever in the mood, would you care to explain if using rel=nofollow is appropriate on links to internal unimportant pages that are linked on every page, such as an “about the site” page (colophon), disclaimer, copyright statement and such. These pages tend to accumulate the highest pagerank of the entire site, while they are the least important to searchers. Would it be ok to put rel=nofollow on all links to such pages?

Geoffrey Faivre-Malloy August 25, 2005 at 12:56 pm

LOL – Awesome domain name Matt!

G-Man

laura August 25, 2005 at 2:01 pm

while its good to hear the dashes are ok, i certainly hope that http://www.buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com doesnt get flagged. i love that site.

Murugan Ranganathan August 25, 2005 at 7:39 pm

Matt has already explained this 1 1/2 years back at

http://www.webmasterworld.com/forum3/23371.htm

alek August 25, 2005 at 8:31 pm

I saw a comment about domainnames, so while I know Matt knows this, I didn’t see him comment on it explicitely … but underscores are NOT RFC legal for *domainnames* … so the dash vs. underscore argument is moot in that area.

However, it’s a possible scenerio is in the *pathname* component of the URL and Matt’s comments are quite interesting/helpful.

I’ve seen endless arguments about dash versus underscores in the *domainname* … but have yet to see a domain name with an underscore … ;-)

Michal August 25, 2005 at 9:11 pm

Matt, great post. I however prefer to use commas in urls. As an example, check out the results for search terms (without quotes): “google api”, “google-api”and “google,api”.
It seems that the search term with a comma returns exactly the same results that the search term with spaces.

@PhilC: I always thought that you “bloody british” would be more likely to use the term “obfuscating” ;) .
Nice seeing you here. I have to go back to your forum soon. :)

PhilC August 26, 2005 at 5:08 am

hehe…

I don’t recall coming across the word before, but I’m sure gonna use it a lot – it’ll make me sound very technical and clever :D

Dann Yee August 26, 2005 at 7:44 am

Sigh…. My book reviews use underscores in the review names and mixed case (another mistake), but I’ve kept on going the way I started rather than switching to dashes and all lower case. But my file naming conventions are a legacy from delivery by ftp – and a modified finger daemon, would you believe!

I’d guessed its programming roots were the reason for Google’s aversion to treating underscores as spaces, but I would expect the amount of text that uses them that way (or, in my other use to mark a _Book Title_) now exceeds the source code with _variables.

spike August 26, 2005 at 10:09 am

I like using dots between words. Search engines seem to treat them the same as hyphens but they looker much neater to me.

The whole URL then contains only slashes and dots as punctuation. I find that to be easier to remember too.

http://www.example.com/some.folder/some.thing/what.ever.html

Ben Fisher August 26, 2005 at 3:25 pm

What would be a good rule of thumb in # of -,s in file names?

polo August 26, 2005 at 6:41 pm

why is everyone saying – vs _ in the domain name?

what i think he means is the use of – vs _ in filenames and directories, not the actual domain name…..

nq August 27, 2005 at 12:58 pm

Great article! Thanks!

Low August 27, 2005 at 9:54 pm

Three years ago, GoogleGuy said something about hyphens in this thread on Webmasterworld forums:

http://www.webmasterworld.com/forum3/4572.htm

So, “hyphens are better for Google” it’s an old news, but I appreciate the new elaboration. :-)

Chris August 28, 2005 at 2:12 am

German grammar is a bit different. Unfortunatelly http://www.google.de/ does manage dashes and underscores like in English.

Explanation for non-German readers:
bus (ger) = bus (eng)
autobus (ger) = bus (eng) [It's just another word which is not used so often]
auto (ger) = car (eng)

Okay, I will explain:

In German, [b]autobus[/b] = auto-bus[/b]. But it’s different from [b]auto bus[/b].

So if I search for [b]autobus tour[/b] I find what I want o find: [b]autobus tour[/b].
But if I search for [b]auto bus tour[/b] (which means I am looking for a tour by auto [b]or[/b] bus) I also find pages with URLs like http://domain.de/auto-bus/ . As pointed out before [b]auto bus[/b] ≠ [b]autobus[/b] so my search results (which also include [b]autobus tour[b]) are wrong.

dante August 29, 2005 at 3:25 am

I would also like to see the german version fixed.
are there actually grammatically adapted google-index versions or use they all the english grammar?

Alan Perkins August 31, 2005 at 5:37 am

“I often get asked whether I’d recommend dashes or underscores for words in urls. For urls in Google, I would recommend using dashes.”

I’m surprised at you, Matt, pandering to this nonsense. The correct answer is of course “Do what works best for your visitors.” ;)

Next you’ll be suggesting that keywords in URLs actually make a difference to rankings…

ShiftLock September 1, 2005 at 7:48 am

What about plus signs? In key-value URL string pairs, the plus sign is already recognised as a place holder for spaces (as well as %20 if encoded).

Why wouldn’t Google follow that format?

site.com/learn+how+to+use+alternate+style+sheets

Ethan September 7, 2005 at 8:06 am

I think Chris’s comments make a bit of sense, and I’ll stick with my use of underscores. I haven’t had a problem with them myself. Hyphens just remind me too much of all those sites that try and spam my webstats.

Matt September 8, 2005 at 2:58 pm

I just tried to register buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com at Enom and it wouldn’t let me. Pah.

richardb September 9, 2005 at 11:15 pm

It’s interesting how trends can date and dates define phases. With one flick of a button thousands of sites and millions of pages-can-be-******.

owen September 12, 2005 at 1:28 pm

Are we sure Googles algorithm doesn’t lower rank dash named URLS. I have had a couple of websites go to page 50 from page one, and they have dashes. The keyword searches show no Google results with dashed urls in the first 3 pages either, whereas at least 1/3 of the search results used to have dashes. hmmm

John Gall September 12, 2005 at 6:09 pm

My next question would be can Google and other engines parst separate words in a domain name if you don’t separate them with a dash? I always choose a domain with no dash figuring it looks less like spam. I had hoped they could pick out the keywords but was never sure. Thanks for making your blog entertaining.

John

Dirk September 13, 2005 at 6:13 am

This is interesting. I guess my site’s safe then and that the Wordpress guys did their homework…

MC September 29, 2005 at 6:52 am

Here’s a more basic question – how relevant is the URL name in SEO ranking?
Eg. How much better is http://www.myurl.com/product/shoes/nike.htm then http://www.myurl.com/p/s/n.htm?
Given that everything else is the same on both pages and the their SEO optimized would there be a significant difference in ranking?
Thanks in advance!

Stacy October 14, 2005 at 12:14 pm

Okay take a look at this URL. I am curious to all of the double and triple dashes. I have heard that Google thinks it is another page? Does google throw that URL out and not rank it because of the multiple dashes?

Thank you and I look forward to your reply.

Stacy October 14, 2005 at 12:15 pm

Sorry I did not realize that it does not show our URL:

http://store.yahoo.com/y2kuniforms/housekeeping—smocks–dresses—aprons.html

Matt October 15, 2005 at 8:41 am

Stacy, those hyphens wouldn’t automatically cause a problem for this url. It doesn’t look great, but it wouldn’t automatically hurt you in Google.

Mike November 5, 2005 at 12:21 pm

Thanks Matt for the clarification. It has been a debate since I started my wedding store.

Chung November 18, 2005 at 9:09 am

Thanks, for this info! I personally was using underscores, but now thanks to this post I will use dashes.

Thanks again

Michael November 18, 2005 at 10:23 am

I have gotten two sets of opinions concerning my url:
http://www.k1-fiancee-visa-law.com
Some “experts” have told me to get rid of it quick because I will never rank high with Google due to the multiple dashes. Others say it is perfectly fine and will not have any negative effect upon ranking with Google…HELP!!!!!!

Mike November 22, 2005 at 9:25 am

Hello Matt:

I came back here to see if anyone posted any responses to my post, ONLY, my post has been removed? I was wondering if I did something wrong? I also noticed that in Googles recent change in PRs…my site this morning went from a PR3 to PR0–any correlation between my being deleted from here and my site being demoted? Thanks for your help.

Mike November 22, 2005 at 10:58 am

PR is back, but still curious as to why my post was removed from here? I found this site to be very useful and informative and would love to be able to participate. Thanks…Mike

Mike Chau November 24, 2005 at 7:55 pm

What is the maximum number of words and dashes will make your url not so conspicuous.

I have a website http://www.start-online-internet-business-cheap.com/.

Is this too long?

SeanIM November 30, 2005 at 3:35 pm

Totally agree with what Markus mentioned.

Site having – in url with tons of subpages and/or scraped pages is just a good way to catch spam stuffers.

PS: Great blog, love it so far! Shocked I just stumbled on it recently, I really need to get out more.

:)

John December 23, 2005 at 1:01 pm

What about the use of “+” vs the dash, how is the plus sign taken into account?

Thanks
John

Mike D December 31, 2005 at 11:13 am

I have a site with a page that has the url /keyword1_keyword2_keyword3.php

If I search for keyword1 keyword2 keyword3 then my page comes up top of the list. If I search keyword3 keyword1 keyword2 then it still comes up at the top.

This seems to go against what you recommend for filenames, google seems to view a – the same as a _ in the filename. It probably treats _keyword different to keyword if it appears in the title or the body, but I seriously doubt there is any difference for the filename.

I have seen pages with lots of dashes in the hostname perform well but I would recommend no more than 2 dashed (ie. 3 words)

omaha kid January 9, 2006 at 2:10 pm

I also want to know about the + instead of dash or underscore.

Q1:What is the relevence to sites I have seen start using this?

Q2:Would you recommend to go back and fix all your linking structure if you plane on adding lots more pages or mix the two starting with the new + or dash instead of underscoring?

THX omaha kid

Another MikeD January 10, 2006 at 11:00 pm

I personally don’t think that a url should be designed for the search engines. I think the shorter the better. If you have something like real estate page on your site, the yourdomain.com/re is what I would recommend instead of yourdomain.com/real-estate-listings.html
Mike Dammann

Rakeback January 31, 2006 at 8:07 pm

Ouch, guess who has been using underscores all the time :]

InternetPolyglot February 9, 2006 at 5:35 pm

Yeah, I have been raking my brains what would I use and a couple of weeks ago started using underscores. Thanks to Matt for the article and to the guy who recommended this blog to me. Moving to hyphens!

Dave March 18, 2006 at 4:34 am

Thanks Matt. I was always confused on this issue.

Torontodave March 18, 2006 at 9:10 am

I have 2 sites relatively new done with each method. It’ll be interesting to track each of them. Thanks Matt!

Toronto Dave March 19, 2006 at 7:17 pm

I was talking with someone recently who thought that no matter how long the url is, keep it hyphen or underscore free. I don’t agree, and have been doing underscores, but I think I will do hyphens now. Either way it makes the URL less of a headache to read if itissuperlong – dot com. Not using hyphens or underscores isn’t making it (the URL) user friendly to read and remember.

John "zeke" Brumage April 28, 2006 at 8:38 am

You can’t register:

buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com

because it exceeds the 64 charactor limit.

me May 9, 2006 at 11:01 pm

what about using $#&* to seperate words…i find that works much better then – or _

Dr. Anna Macelley May 19, 2006 at 5:15 pm

Hmm …

>>I often get asked whether I’d recommend dashes or underscores for words in urls. For urls in Google, I would recommend using dashes.

unfortunately all links in our site are underscores. :-(
why i know about this only now :-(

stretch dog May 23, 2006 at 2:34 pm

“Matt, when you’re ever in the mood, would you care to explain if using rel=nofollow is appropriate on links to internal unimportant pages that are linked on every page, such as an “about the site” page (colophon), disclaimer, copyright statement and such. These pages tend to accumulate the highest pagerank of the entire site, while they are the least important to searchers. Would it be ok to put rel=nofollow on all links to such pages? ”

I reiterate this because i too was wondering the same (or similar) thing. I have a blog with global hard links to the different categories of products on a product site… and think it is causing the blog to be seen by the search engines as link spam… when it fact the site is rich in content and contextual links to support information.

Those links are there to make it easy for my blog visitors to navigate “directly” to the specific product areas of the sibling “shopping” site that are most interest to them.

If i was to add the “rel=nofollow” attribute to those links would the search engines see it as appropriate use and recognize that those links were not in fact put there to influence ranking, but rather for user friendliness. Or is it “inappropriate” use and perhaps hurt me even more… ???

Some feedback would be much appreciated Matt… thank you.

SD

Pete from down under May 23, 2006 at 3:21 pm

I read with interest your comments and the feedback about using hyphens in URLs – all good stuff. But I couldn’t see where anyone addressed this question (forgive me if I missed it):
Would you be likely to get a better result in the serps using a hyphenated URL vs all one word. ie Would hardware-tools.com rate better than hardwaretools.com
To me that is a burning question.
I have often wondered how successful Google is at separating two (or more) common words.
If anyone knows the answer to this one I would love to know more.

Mack May 25, 2006 at 8:25 am

I too am a bit confused. If there is a definitive answer on which type of punctuation is more likely to help rankings in the SERPS, I missed it.

I will say that in checking my back links this morning that considerably more had underscores than hyphens even though I know the majority of my back links have more hyphens than underscores.

Is it possible that the “Big Daddy” update has anything to do with this?

Thanks,

Mack

Lee June 1, 2006 at 6:56 pm

My boss won’t let me share the our URL but if I search for certain keywords that bring up our underscore named files, the individual keywords are ‘bold’ in the SERP (in the url that appears beneath the site descriptoin), leading me to beleive that GOOGLE now understands the underscore as a space. Matt, Has this changed?
Lee.
*edited before I even posted*
I found a good example, search for http://www.royalbridge.com medical web
and look at the URL. “medical” and “web” are both are “bolded”. Have I, perhaps, misinterpret the significance of this “bolding”?

Mike June 20, 2006 at 1:56 pm

Matt, I wanted to register that domain, but it’s too long, though it’s perfect :P
do you have any shorter suggestions ? ;)

AO July 21, 2006 at 11:40 am

Great article. I’m curious about concatenated vs. hyphenated words (new-york vs. newyork vs. new_york).

I agree with Chris earlier post with the “Catherine Zeta-Jones” example. In general, I try to keep names down to one word. If that’s not desirable, I just concatenate the word without any spaces. This is probably from my programming experience with languages like Java/C# in which class names, by convention, usually don’t have underscores or hyphens.

Imagine how many times you hear people say something like, “www dot domain dot com slash matt cutts”, “All one word”.

Kencian July 22, 2006 at 6:26 am

I wish I had known that before my site got indexed. I’m switching over to underscores on everything new.

Ryan August 18, 2006 at 10:20 pm

So an SEO has told me that my site has too many dashes and will be penalized by google for that….www.disney-orlando-hotel-guide.com…but I’m all about the white hat….and no spamming and real genuine original content…will it still get penalized by google…Matt I’d really really really love to know.

By the way, my reasoning for doing that was that when people start linking back to my content using just my domain name, which is invariably going to happen – especially when I start figuring out what really cool content people want to link to, at least a few of my keywords will be in the anchor text.

I don’t think I’ll be penalized, but I’m really early out in the game so if I indeed have to change my url, I’d love to know from now (2 weeks into it) rather than 6 months from now when I cant get on any SERPS.

Ryan August 21, 2006 at 3:47 am

Has google recently changed its stance on algorithmic penalization for too many dashes in a url since you worte this Matt? Becasue many SEOs out there seem to think so…I don’t believe its in the interest of “organizing the world’s information” to do so…but I may be wrong.

bob vs the internet September 7, 2006 at 10:43 pm

stop worrying so much about the domain name syntax… what’s more important is what anchor words folks use to link to you.

even if your domain is blue.com if people link to you fuschia you’ll be returned under a result for google : fuschia.

the main reason hyphens are useful is because it encourages a blogger or passerby to link to you using a space (this is because more typers are too lazy to type the dash or shift-).

bob vs the internet September 7, 2006 at 10:45 pm

grrr… theres a spam site at blue.com… sorry… i promise i dont own that site =(

pr0n September 15, 2006 at 4:36 am

I see tons of sites doing this, and some do it in not so hidden ways. But I digress, this same thing can be done in several ways that accomplish the same goal but make it so users really can’t see it.

ALT Tags
Use alt tags to stuff keywords in, block google image bot in robots.txt and voila, google will index your site and harvest all the keywords from the alt tags. ()

NoScript
Using noscript tags you can accomplish this same thing, only because googlebot doesn’t use javascript it will read your keywords and index them. (viagra, image, me, blah, googlespam

Will Johnson September 17, 2006 at 1:00 am

Thanks Matt for info on Dashes and underscores

Greg Kainer September 20, 2006 at 4:35 pm

Grin and bear it ! On a lite note – Doesn’t “that dashing fella Matt Cutts have a better ring than Matt Cutts underscored” ? So …

Linda Bustos October 4, 2006 at 7:00 pm

Wicked cool, I’m gonna buy that uberlong domain now, it already has a backlink from Mr. Cutts. Top 10 here I come!

Thanks for the great post.

Stephen Sanders October 6, 2006 at 2:39 am

Hi Matt,

Has anything changed with regards to how Google handles dashes and underscores since you first created this post?

I did a Google search for Dashes vs Underscores and lying just under you in the SERP is a site that actually uses an underscore to seperate the words in their url; and they are treated seperately.

With Wikipedia being sure a useful resource and using underscores to seperate words in their urls, would Google have altered the way they handle underscores?

Great blog by the way! – I really liked the video sessions you did.

Thanks, Stephen.

tomo October 8, 2006 at 6:00 am

http://www.google.com/support/analytics/bin/answer.py?answer=27231%20

Google itself recommends underscores, so what should we use ?

WebMaster ToolBox October 14, 2006 at 12:07 pm

Well if Google recommends underscores, use underscores.
http://www.google.com/support/analytics/bin/answer.py?answer=27231&query=underscores&topic=&type=
Says to replace spaces with underscores so that you don’t get the %20 in the url

MrJohnCory October 17, 2006 at 12:40 pm

I would argue for underscores as dividers so that you can use hyphens as intended.

If you’re rewriting URLs to make “chicken with green-smelling sauce” a URL, “yoursite.com/chicken_with_green-smelling_sauce.html” works better than “chicken-with-green-smelling-sauce.html”

And why shouldn’t I be allowed to use a bunch of hyphens or underscores in a URL? My-Site-Is-Really-Freaking-Awesome.com/And-You-Know-It.html might just be the only way to convey what I want to convey, y’know?

イーリング October 19, 2006 at 8:13 am

Hi Matt.

Are there any differences b/w languages (Google Japan, USA…)??

AndroidIQ October 24, 2006 at 6:01 pm

Another question about pluses (+) vs. dashes (-)

Is there a difference? Encoding URLs requires the use of (+). Thoughts?

Silver Jewelry October 25, 2006 at 7:55 am

Would too many dashes in url considered spamming ?

Gwen November 18, 2006 at 9:41 am

dashes are good…but sometime the underscore are still in front my results for some queries

thatSEOguy December 13, 2006 at 1:26 am

Dashes are more visually appealing from an aesthetic standpoint.

seo wannabe December 19, 2006 at 1:13 pm

a “dash” (-) in a key word is given more importance in search engine crawls than un-hyphenated words. They are filtered first.

true or false matt?

Nuno Oliveira December 21, 2006 at 1:46 pm

No official reply about the hyphenated vs concatenaded domain. 3 people asked about that but no one cared.
I register all my domains as keywkeyw and not as keyw-keyw.
What his better for search engines? I’m not talking about boosts. I mean, what do SE’s prefer? They can easily separate the 2 keywords out of the concatenaded version?

Thank you!

Nuno

Nuno Oliveira December 21, 2006 at 1:47 pm

Sorry for the typo. I meant “concatenated”.
I hope SE’s do well extracting the keyws from the non-hyphenated version. It’s easier for my visitors, so that is why I choose them.

arama motoru December 27, 2006 at 8:17 am

a “dash” (-) in a key word is given more importance in search engine crawls than un-hyphenated words

lazer epilasyon December 27, 2006 at 8:18 am

dash is better, i think

lazer epilasyon December 27, 2006 at 8:19 am

dash is better, i think

Jeremy January 14, 2007 at 4:49 pm

I manage 2 sites,
http://www.thrifty-net.com.au
and
http://www.comshelf.com.au

and the one with the dash is being ranked far lower than the site without a dash in the URL. Google is doing something else with dashes, it seems to be to do with other sites linking to http://www.thrifty-net.com.au don’t get counted as they are not listed in Google Webmaster tools.

Cheers, J.

Frand January 31, 2007 at 1:38 am

we recently changed our urls to use “_” (was before I have read this page) for our auto glass windshield repair and replacement site, let’s see how that will influence our site positions. Will update you with results.

avel February 15, 2007 at 2:09 am

Do the last link active and sell it already with PR 5 backlink ;)

askApache February 25, 2007 at 8:06 pm

Glad to get an answer on whether or not Google likes dashes or underscores… For those of you looking for an automated way to convert underscore urls to dashed or hyphen urls check out the article http://www.askapache.com/2007/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html

ralph March 12, 2007 at 2:31 pm

I saw this mentioned a few times throughout the comments, but nothing seemed definitive. What do dashes do for page ranking? Content is king, but would I get even the slightest upgrade on the results list by getting rid of or always using dashes in my filenames? is “long-page-description.html” better than “page78.html” or “page.asp?pageid=78″ I’m tempted to think the descriptive, dashed filename helps since Google bolds your search terms when those words are in the url, but it seems like it’s far too easy for spammers and scammers to use that to their advantage and dashes in filenames could cause a penalty…

George March 16, 2007 at 10:42 am

A good laugh, thanx for that.
What about writing two words together? Is a site for Koh Tao better called koh-tao-community.com/ or kohtao-community.com/ (i’ve made my choice already)
How does Google see the space where there isn’t any and what would be higher listed for the search on ‘koh tao’?
Or how about using your example:

http://www.buycheapviagraonlinewhileconsolidatingyourdebtsoyoucanplaytexasholdemwhilewatchingporn.com

How would Google seperate that?
Cheers
George

Rick March 28, 2007 at 9:48 am

Good content Matt – and nice question George! I too am interested in the answer to George’s question on March 16th.

A simple search I conducted seems to render underscores, dashes and no spaces irrelevant. Consider the search:
“north face denali mens jacket”

The following URL’s are presented in the first two pages in the following order:
http://www.nextag.com/the-north-face-denali-jacket-mens/search-html

http://www.epinions.com/otdr-Apparel-All-The_North_Face_Denali_Jacket_Mens_2002_zipper

shopping.yahoo.com/p:The%20North%20Face%20Denali%20Jacket%20Men’s:2000000082

http://www.geardirect.com/geardirect/ctl3981/cp20796/si2274335/cl1/thenorthfacedenalimensjacket

Do you think that Google preferred one methodolgy of linking keywords together in a URL then the other? Seems unlikely to me and that the order of presentation on Google is more likely due to a relevancy or page ranking metric.

Thanks for any insights you can provide!

– Rick

lawrence April 5, 2007 at 12:24 pm

This is a very interesting topic.
Undersores vs hyphens

I did a couple of searches in Google and came across a site named http://www.make-a-website.com. This site rank number 1 for the keywords “how to make a website” from over a billion websites and no 2 for ” how to create a website” from over 600 million website.

This tells me that hyphens does not matter.

I’m busy experimenting with a website that I have registered called http://www.how-2-make-website.com. I’m in a tough group, but I want to see how far my hyphenated website is going to rank.

I will give some feedback as I go along.

lawrence April 6, 2007 at 9:25 am

Sorry guys, I made a mistake in the two URL’s that I gave in the previous post.

The points must not be after the .com in the URL’s.
Below are the correct URL’s

http://www.make-a-website.com
The site that is first from over 1.2 billion websites in Google

http://www.how-2-make-a-website.com
My experiment site with dashes

Asha April 9, 2007 at 10:58 pm

HI Matt,

I have read a lot about your blog, but never really checked it out properly. I think it is simply great with all the discussions and your logic behind. I will be spending some more time on it very soon.

BTW thanks for letting us know the logic behind using hyphen and underscore in SEO. I have been using hyphen in all my file names and they seem to be doing good. But I am still not sure how much weightage a file name gets in an overall page ranking.

Cheers!
Asha

Allan Slider April 13, 2007 at 8:12 am

http://www.mattcutts.com/blog/dashes-vs-underscores/
Is this still true today? we are considering making this change to our website, as our category pages are named faux_wood_blinds. What is the best strategy for making this change and avoiding getting in the supplemental results (we have been there before)? Thank you!

Elja Trum April 17, 2007 at 2:55 am

I’m also very curious to find out if this is still true.
My weblog is based on using underscores in the url and the search engine rakings are pretty good. I’m willing to change, but I doubt it will get better.

Or are pagenames simply not important enough in the complete ranking proces?

Elja

Tom April 21, 2007 at 5:06 pm

Does this mean that http://www.cannabis-seeds.com would be preferable to http://www.cannabis_seeds.com – or is it actually all to do with links as i have often been told?

Kyle M Brown April 22, 2007 at 8:07 pm

I have been writing PC’s programs since 1986. Recently I noticed lots of hypens being used in URLs, mostly by techie types of websites or businesses that are completely online like Amazon.com. The last few years Ive been focusing on search engines and SEO.

It Immediately put this together. It makes so much sense that the search engine written by programmers would by smart enough to find these little details.

Ive never programmed a search engine but there are certain programming etiquette that is visible all over the web and if you’ve ever programmed, you will notice it. Examples are the hyphen versus the underscore. When writing code the computer will interpret this (FTP_Binary) a one word or phrase but it will interpret this is two words (FTP-Binary). They will NOT be understood the same way by the PC.

The underscore is read as a connector of the two words making them one word, where as the dash-hyphen is used to separate the words.

Another example of programmer syntax translating into the real world is words that start with lowercase letters and follow with a uppercase letters, like eBay.

Often when declaring variables, classes and such the syntax will require names that are usually named in this manner. Other times the syntax will have names that are built in with this syntax.

I’ll stop myself. Sorry to rant on your blog.

Cannabis Seeds April 24, 2007 at 12:27 pm

a “dash” (-) in a key word is not given more importance in search engine crawls than un-hyphenated words, that’s not true and I don’t seem where you got this info, arama motoru.

Doug April 25, 2007 at 4:59 am

At a Bruce Clay course I attended a while ago he also mentioned that the underscore is a alphabetical character, which may change the literal meaning of two conjoined words like “matt_cutts”=”matt$cutts” (a nonsensical keywords). Whereas the dash carried the same or similar weight as a space would “matt-cutts” = “matt cutts”.

Thanks Matt, love the blog read it frequently.

discount window blinds April 25, 2007 at 8:12 am

If you make the move from _ to -, is it necessary to do a 301 redirect to avoid duplicate content? Thank you

davin April 30, 2007 at 1:19 am

After a lot of research i found dashes are much more search engine friendly then underscores.thanks matts

Perfect Wealth Formula May 4, 2007 at 8:08 pm

I’ve always wondered if dash vs. underscore
really mattered. I now have my answer!

Unfortunately, I’ve been using underscores
way more than dashes the past 4 years…doh!

Daniel

Dmitry HT May 5, 2007 at 3:00 am

Great and very good post ;)

But I have one more quoestion: should I use dash (-) or underscore (_) in my images names and pathes?

Thanx.

Oudam May 8, 2007 at 6:57 pm

Dashes make words easier to read in addition to being good for SEO.

Danny May 10, 2007 at 5:54 am

Hey, Matt,

sorry, but you are mistaken. Look at our site http://www.samsonblinded.org/blog
All internal pages with url format NNN.htm have PR. All internal pages with urls abc-def-mng.htm have 0 PR. Perhaps Google accepts one or two dashes but hates many dashes in url.

电子网 May 20, 2007 at 7:45 am

Do the last link active and sell it already with PR 5 backlink

Tayyab June 4, 2007 at 12:31 am

Well Matt nice information BUT I have used “_” underscores in my site. Now tell me what shoul I do..?

Paul Easton June 14, 2007 at 2:53 pm

Makes good sense as dashes are easyier to read, withh all letters in any words. in the over all picture of ranking, maybe not the biggest effect. I note that most blogs (wordpress at least) are using dashes, so thats something

Paul

Ron June 20, 2007 at 7:52 pm

I’m really hoping someone will weigh in on this question soon….preferably Matt. Hyphens are better than underscores, but does it make any difference if you have bigbluewidgets.asp as opposed to big-blue-widgets.asp?
Google still sees and recognizes the words in bigbluewidgets.asp just as well as big-blue-widgets.asp, right?

LOL – I’ve been challenged on this question that why I’m anxious about a response.

Thanks!

uxdesign July 9, 2007 at 4:16 pm

Well done Sir! The link to infolab.stanford.edu/~backrub/google.html alone was worth the price of admission. :-) Thanks Matt!

brainw July 11, 2007 at 7:27 pm

Nice articles. Have you ever been digg ??
Digg was using underscores in their link url title . Any idea why they did not use hypens but rather an underscores ??
ex. http://digg.com/world_news/New_imagery_of_Iran_s_nuclear_project_now_on_Google_Earth

thanks

King Rosales SEO July 22, 2007 at 1:10 pm

Thanks for this post Sir Matt,

first, I wonder how many people clicked: http://www.buy-cheap-viagra-online-while-consolidating-your-debt-so-you-can-play-texas-holdem-while-watching-porn.com since this post was created (lol)

and secondly, i noticed that even Google uses underscores in the Google Directory… ie. http://www.google.com/Top/Computers/Internet/Web_Design_and_Development/Designers/Full_Service/B/
does that significant to this discussion or is it just using an old file/directory naming structure?

I-design July 24, 2007 at 8:27 pm

Ok, so if we have underscores in some of our Urls, how
do we change them without losing rank on those pages.
I think its not possible!! And how do you do it in a way not to trigger
duplicate filters

cheers
from downunder

Phil July 25, 2007 at 3:58 am

What about using another character instead of underscore or hyphen? what about separating words in a url using a comma? “,”

Is this allowed and what does google think of it?

Cheap Web Hosting July 25, 2007 at 6:49 am

Actually It is very good to use an url which has small length. In the same time it should be easy to handle?…

Web Development July 25, 2007 at 6:51 am

I have used a mod-rewrite option on my web. When I asked google to check my site. It said it can’t get the robots.txt file. Any idea for this…

Wes Mahler July 27, 2007 at 8:38 pm

AWESOME, searched using dashes for seo wondering about this, and came to ur site 1st on google, sweet thanks, i was USING underscores, arg!!!! thats what digg.com sues so I figured it was a good way, guess not!

Graham August 7, 2007 at 5:55 pm

hmmm, after reading all that im still confused…….I “think” its best to use “-” then for the engines as “_” can cause possible programming confusion but no clear answer?

Links Directory August 10, 2007 at 11:07 am

Kyle’s post above makes a lot of sense I think, anyone else agree or disagree before I go change all my _ to – ?

MSN Names August 11, 2007 at 8:30 am

i think the dash is the best for search engine results..

eBay Blog August 20, 2007 at 5:04 pm

Matt, thank you for this information.

But after reading the article I still have a question:
If a domain name I own (or want to register) consists of a two or more words, which would be better: with dashes or without? E.g. pcgamesreview.com or pc-games-review.com?

Jon Dale September 2, 2007 at 11:35 am

Extra hyphen needed? Or better with none?

http://www.appearancematters-dentistry.co.uk

sandra September 26, 2007 at 8:14 pm

Allright, so dashes are better than underscores. What about if in the URL, I simply join 2 words together, like word1word2, without a dash or an underscore. Would I still show up in Google for a search for word 1 and word 2?

Design September 28, 2007 at 5:37 pm

If you make the move from _ to -, is it necessary to do a 301 redirect to avoid duplicate content?
Thank you

Prathik Raj September 30, 2007 at 6:40 am

Well if you prefer dashes, then you will have to talk to people at wikipedia, cos underscore is more there, and I don’t think it makes any difference if we use a ‘-’ or ‘_’

Victoria Rogers October 5, 2007 at 8:38 am

Have been trying to figure out best way to name files – it’s so simple, but never thought about just typing in the name with hyphens, underscores and then without to see the difference in what comes up.

Some times all the details get in the way and I forget to keep it simple …

Thanks.

Granite Counter Tops October 9, 2007 at 11:00 am

I really want to know whether the hyphen in a domain name is different with without from google search with the keywords .But however,thanks Mattcutts very much.

Robert October 10, 2007 at 12:29 pm

I have used a mod-rewrite option on my web. When I asked google to check my site. It said it can’t get the robots.txt file. Any idea for this…

Rieke Indrianty October 10, 2007 at 12:32 pm

So actually underscore and dash has some implication? Interesting to know! I’ll definitely test that in practice. Thanks Matt!

Alex bell October 16, 2007 at 11:16 pm

Hello
A simple way of seeing that underscores are not treated as spaces is to type a phrase into the searchbox, but with 2 words joined together by an underscore.

Regards,
Alex Bell.

Mike November 6, 2007 at 10:51 am

Alex,

I believe it is a mistake to make the assumption that Google treats underscores the same way when it is indexing sites as it does when processing a search request. It is quite possible that it does not treat them as spaces for a search request but does when crawling and indexing sites. For that matter, it may not even be that simple. Their algorithms may be, and I would suspect that they are, far more complex than that, creating some semblance of intelligence in their software.

gromo November 10, 2007 at 3:06 am

i use dashes because underscores sometime creates confusion in mind of visitor

John Klingler November 11, 2007 at 9:03 pm

It seems like one dash is OK in the url but more starts to look bad. I had some multi-dash urls but abandoned them. The funny thing is that wordpress can create very long file names that have many dashes but wordpress page are well liked by Google. I guess that blogs have different rules than other sites.

Michael Corvin November 12, 2007 at 8:25 am

I just want to ask if it’s ok to use “|” instead of “-”?

Thanks for the information Matt…

Anne November 12, 2007 at 9:31 am

How about + or any mathematical symbols, can i use them?

CCL November 18, 2007 at 11:16 pm

Ug….so basically, having underscores is bad? We used them on a recent optimization of an office furniture store.

Ya think google might wise up to this at some point? If you look at most all major online directories they are built with underscores….

5ubliminal November 26, 2007 at 7:10 am

@Anne: You can also use the Euro € sign if it makes you feel any better. As you might know + replaces [space] in urlencoded strings so not the best choice.

Using – instead of _ is normal from any coder’s point of view. It’s the name of variables, constants and so on … that contain _ and coders often search these online. This was developed by real coders who know these deals.

On the other hand – is better then _ from an esthetic point of view. They just look better no matter how you look at them.

And posts like can I use xxx instead of – are just stupid and made for the sake of a nofollow link. You can use anything but do it at your own risk or welding words together.

Google, amongst the ‘evil’ :) things it does, has a bunch of really good coders (and apparently Matt can also code). And coders have a different vision of the world – most times better! (I’m a coder too and I search virtually every day for stuff with _ inside which form words and Google provides.)

Jan Smite December 4, 2007 at 11:40 am

Did you know that Linux cannot resolve URLs with hyphens on it?

David Melamed December 11, 2007 at 4:16 pm

Hey Matt,

I have an interesting question regarding dashes in the URL.

One of our clients, we just started working with has a very interesting page with the following URL…
http://pokerchest.com/poker-chips–chip-cases—racks.html

I wanted to know if the two dashes in a row are the reason google doesn’t have this page indexed? do two dashes make it like the first dash is minus-ing the second dash? (Perhaps it’s in the index, but we can’t find it because when we search in google, the first dash minuses the second dash, and it isn’t recognized…)

What are your thoughts? where can I find a clear breakdown of google’s ideal url structure, etc…

Thanks a million,

David Melamed
Rock Island Group

Murilo December 18, 2007 at 5:25 am

What about to use “+” in the url. Is it better than to use “-”?

Dan December 20, 2007 at 8:06 am

Hi guys,

Apparently underscores are now treated as spaces by google:

http://www.news.com/8301-10784_3-9748779-7.html

Regards

information managerment December 31, 2007 at 12:55 am

Oh great, i so did not know that before.
I always used _ instead.
I will make sure next time i wont make this mistake again.

Affiliate marketing guide January 1, 2008 at 1:33 pm

Hi,
Great article on hyphens vs underscores

A lot of people have asked about the hyphenated vs unhyphenated domain names

The current advise is to get both versions.It will cost you an extra 9 bucks a year and could improve your rankings and traffic. Which is worth way more than 9 dollars

Ethan January 18, 2008 at 1:26 am

I always used dashes.. because it looks better than undescore…

nakli January 18, 2008 at 4:21 am

I wanted to know if the two dashes in a row are the reason google doesn’t have this page indexed? do two dashes make it like the first dash is minus-ing the second dash? (Perhaps it’s in the index, but we can’t find it because when we search in google, the first dash minuses the second dash, and it isn’t recognized…)

What are your thoughts? where can I find a clear breakdown of google’s ideal url structure, etc…

Thanks a million,kjöıköıkı

David Melamed
Rock Island Group

GSL January 25, 2008 at 3:35 am

Hi Matt!!
THIS IS FOR THOSE WHO ASK THIS QUESTION:
DOES THIS LOGIC STILL HOLD ABOUT DASHES OR UNDERSCORES.

The logic that you have told around 2 n year back is still valid. and I have observed this practically as well…

Lets DIY:
enter seo-prfessionals and see the number of results retuned by Google.
Now use seo_professionals and see the number of results and analyze them carefully you will get your answer..

Thanks
GSL

Adam January 29, 2008 at 7:44 pm

Matt, just wondering how you would respond to this post, asserting that underscores are better than dashes?

http://12pointdesign.com/advice/dashes_vs_underscores.asp

Dick, in Sweden! February 2, 2008 at 1:57 pm

Help?
I just made a search, and saw (has this been so before…? –> ) that filenames with several words in them was read each by Google even though there were no underscores or dashes between them, ie words together in the filename. So that Google locates/reads each word in those url-files, as in the domain name. Is this new or not?

Then I wonder why so many people just wonder how Google follows this and that, isn’t it also important what the audience prefer? Do I get more or infact less visitors (ie more or less click on my pages) with dashes in the domain name? I don´t have the experience to know myself and that will probably take some time.

Domain Names India February 8, 2008 at 1:34 pm

I think it should not be a controversy more as Google does not penalize any of these two styles.

But the strongest point I feel in favor of hyphens is.. it has presence in domain names, which underscore does not have. So obviously hyphen is better option.

Though it is strongly said that, it will not affect your SEO.

Thanks

The_Dude February 21, 2008 at 12:44 pm

I think using the “test” of searching the keyworda-keywordb vs keyworda_keywordb and basing which method to use by the results is kind of pointless.

If google is stating that its indexer sees _ as word seperators then that is what you should be using when appropriate or for new content.
http://www.news.com/8301-10784_3-9748779-7.html

Digg is big user of the _ and its results on google match very well with the “natural” keywords I type.

Its how well google crawlers read and index your site, not the obscure way someone may search for your site.

dating February 28, 2008 at 3:03 pm

I prefer to use Dash on URL, because its looks better than underscore. But at the time of others section, like user id, then i prefer underscore.

John Simpson March 4, 2008 at 1:42 pm

I prefer to put a little more thought into the URL name before putting in dashes or underscores. Actually, I thought that punctuation was ignored in the search engines; taken out before the keywords were searched on. Since this does not seem to be the case, I guess “kick-boxing” and “kickboxing” would return different results.

Jim March 13, 2008 at 11:41 am

I wonder if – seperate words (by keeping them individual words and _ connect words turning them into one word?

My real question is what the difference between | and – in the tile tag? I wonder if search engines search by keyword phrases when using | between phrases or words; and using – just seperates the words almost as if the – was not even there? Thanks for your detailed thoughts.

Honey Monster March 30, 2008 at 3:24 am

Thanks Matt,
The historical evolution of Google does throw up some interesting quirks. Can you see a time when Google might review this history and change its algorithm to suit societal changes – more internet users do not have a programming background and use “plain text” thinking to phrase thir search processes?

Airgle May 3, 2008 at 6:40 pm

I changed underscores to dashes for my sites just because dashes look much more professional than understores

Andy Blackburn May 8, 2008 at 7:13 am

Hi Matt,

I know this is a STUPIDLY OLD post, but I wanted to try and get a question answered. Everyone uses hyphens in page names, but what is your view, as head of web-spam, of hyphens in domain names… or even double hyphens. I see a lot of 4 letter domain names, with a double hyphen in them for sale at domain auctions, h–p.com for example, but what if someone were to purchase 3 domains, carhire.com car-hire.com and car–hire.com for example? Would those with hyphens perform better or worse than the one without?

Would be great to hear your views.

Thanks

Andy

Justin Goldberg May 27, 2008 at 1:37 pm

Will google ever publish search results from the past? This would prove very interesting to researchers.

Ruben Zevallos Jr. July 2, 2008 at 4:22 am

I’ve always prefer the dashes… they are times easier to type than underscores… and I hate when you have to use constants with underscores…

Masum August 7, 2008 at 6:44 am

Well, this is very old post but hey I can still express my feelings :-) . First of all I love reading Matt’s post like many others. Anyway.

This is a very interesting post. Very helpful for people with doubts on optimizing URL. I always get this kinda question from my clients and understandably my answer varies from situation to situation. First of all you’ve to work out what you’re optimizing your site for. If you’re targeting for “Dog Food”, you definitely won’t expect visitors searching for “Food”. But if you really do traffic for any of the words then your URL will be different then the previous one. Simple. It totally depends on what your requirements are.

Guy Macon August 12, 2008 at 11:34 pm

Every so often I do a series of tests to see how
the current Google algorithms treat various
characters when used as word separators. Here are
my test results as of 12 August 2008.

Note: I tested these with http://64.233.187.99/
(which may be the Los Angeles Google datacenter)
rather than http://www.google.com/ so as to get
consistant results. The URLs looked like this:
http://64.233.187.99/search?hl=en&q=GuyMacon&btnG=Search

NUMBER OF SEARCH ENGINE RESULTS AS OF 12 AUGUST 2008

First I checked various combinations of
capitalization and quotation marks:

588,000,000 for guy|macon.
588,000,000 for Guy|Macon.
588,000,000 for “guy|macon.
588,000,000 for “Guy|Macon”.
588,000,000 for guy OR macon.
588,000,000 for Guy OR Macon.
588,000,000 for “Guy OR Macon”.

582,000,000 for “guy OR macon”

565,000,000 for guy.
565,000,000 for Guy.

564,000,000 for “guy”.
564,000,000 for “Guy”.

1,210,000 for Guy AND Macon.
1,210,000 for guy AND macon.

184,000 for guy macon.
184,000 for Guy Macon.
184,000 for +guy +macon.
184,000 for +Guy +Macon.

36,400 for “guy macon”.
36,400 for “Guy Macon”.
36,400 for “+guy +macon”.
36,400 for “+Guy +Macon”.

15,800 for GuyMacon.
15,800 for guymacon.
15,800 for “GuyMacon”.
15,800 for “guymacon”

6 for “guy AND macon”.
6 for “Guy AND Macon”

All as I expected, but with one odd result.
Despite Google’s claim that…

“Google searches are NOT case sensitive. All letters,
regardless of how you type them, will be understood
as lower case. For example, searches for george
washington, George Washington, and gEoRgE wAsHiNgToN
will all return the same results.”

…searches for “guy OR macon” and “Guy OR Macon” return
slightly different results. I retried this several times.

Now for the hyphens, underscores, etc…

564,000,000 for guy+macon. (gave result for guy)

1,200,000 for guy*macon.

340,000 for “guy*macon”

184,000 for guy macon. <–(that’s a space the middle)
184,000 for guy macon. <–(that’s a tab in the middle)
184,000 for guy macon. macon.
184,000 for guy?macon.
184,000 for guy[macon.
184,000 for guy]macon.
184,000 for guy`macon.
184,000 for guy{macon.
184,000 for guy}macon.
184,000 for guy”,>?[]`{}macon.
184,000 for “guy”macon”

51,200 for guy-macon.

36,500 for “guy`macon”

36,400 for “guy macon” <–(that’s a space the middle)
36,400 for “guy macon” <–(that’s a tab in the middle)
36,400 for “guy macon” macon”
36,400 for “guy?macon”
36,400 for “guy[macon"
36,400 for "guy]macon”
36,400 for “guy{macon”
36,400 for “guy}macon”
36,400 for “guy,>?[]`{}macon”
36,400 for “guy-macon”
36,400 for “guy<macon”

10 for guy_macon.
10 for “guy_macon”

7 for guyXmacon.
7 for “guyXmacon”

6 for guy&macon.
6 for guy<macon. (gave result for guy&macon)

4 for “guy&macon”

0 for guyWmacon.
0 for “guyWmacon”

CONCLUSION:

_ < & are treated like letters/numbers, not
word separators

Google thinks ? [ ] ` { } are treated
like spaces separating words

‘ . / = \ are treated like spaces separating
words if they are within quotes. If they are
not inside quotes, they are treated as if they
are spaces and are inside quotes.

“guy-macon” gives the same result as “guy macon”,
but guy-macon gives a result unlike any other search.

guy*macon, “guy*macon” and “guy`macon” give results
unlike any other search.

This post sure gets a high ranking when searching for
Guy Macon…

Poker SEO August 26, 2008 at 8:25 am

This is very strange why dashes are ignored by Google. With ever increasing popularity of Internet and fast decreasing the availability of domain names you are left with nothing but dashes.

I’ve practically observed that even using 3 dashes in a domain is ignored by Google and probably by other SEs too.

I was wondering if this is true that Google doesn’t like even dashes too?

John September 18, 2008 at 6:48 am

Hi Matt, thanks for sharing this info with us. I know this is an old post. Is there any way for you to add an update to it with the new information?

http://news.cnet.com/8301-10784_3-9748779-7.html

Right now people are finding this page, trusting you, and thinking it is still correct. So it is very misleading. Please update!

Thanks!

YPI webmaster September 28, 2008 at 12:41 pm

I would like to disagree on that point, as the time is changing, more and more emphasis is given to underscore. Thus they ve become synonymous to hyphens or the dashes. Googles uses word separator from URLs which breaks url on basis of underscore.

Seo team India October 7, 2008 at 2:51 pm

I am happy to see that google now treats underscores as word separators. Earlier underscores were treated by google bot as word joiner.

This is how it should have been way before.

Peter November 5, 2008 at 2:07 am

Hi

Just going back to the upper case/lower case point, I’m ashamed to say that I’ve only just discovered that a search for Blue Pants could return a different result to blue pants.

Is the only way to legislate for this to combine upper case and lower case instances of key phrases within a page?

Margaret November 9, 2008 at 11:52 pm

Peter, the upper case/lower issue was a time consuming aspect some time ago, i must say though that i do not find the need to combine the instances in my key phrases within my pages any more. It would seem that as with hyphens & underscores search engines algorythms are learning how to differentiate good use from bad use….
I just follow common sense and grammar rules with quite good results lately as compared to old days…

Mike December 13, 2008 at 4:25 am

Hi Matt,

Thanks for the info. I always use hyphons in my URL’s so was great you could back this up for me.

Mike January 2, 2009 at 9:43 am

I discovered this page when checking google for the keywords ‘buy cheap v—– online’. Yes this page is the number one listed URL for that expression in google. However, notice that this page is completely irrelevant to the search request. This page will in no way help you if you are looking to buy that well known medication and yet google ranks it first out of 2,820,000 pages.

Internet Marketing Preston January 29, 2009 at 5:58 am

I’ve always used hyphonated url’s for my websites. I initially chose to use them because they looked a darn site better, pun intended ; ) So it looks like I’ve done the right thing keeping the hyphon on board especially after Matt’s statements at Wordcamp 2007 (thanks for the update John).

@Magaret: I completely agree with your capitalisation point. For each and every one of my campaigns there is no change when I change the case of the keyphrase entered.

Nick

Alan March 3, 2009 at 5:38 am

Finally found something that speaks sense, been looking and researching around so many websites for this answer. All of which claim to know that they what works and what doesn’t but they all contradict themselves. I’ve been stuck in two minds whether to go with hyphen or not in a domain name so i feel better knowing i can go with the hyphen which was the better choice of the two :D

Butalbital March 4, 2009 at 3:57 am

I see a lot of 4 letter domain names, with a double hyphen in them for sale at domain auctions, h–p.com for example, but what if someone were to purchase 3 domains, carhire.com car-hire.com and car–hire.com for example? Would those with hyphens perform better or worse than the one without?

Bobby Moothedan March 5, 2009 at 3:59 am

Hi Matt,

I had a question for you. My website intially had product htm files in the root of the website folder. However, after a couple of months, we moved these product htm files to the “product” folder. Now the issue here is that google already indexed the htm files in the root folder. Hence searching on google returned those results which showed links to the root folder product htm files which actually didnt exist. To solve this we used ISAPIrewrite lite. A free tool that made our life very simple by redirecting all hits on the root folder files to the product folder files. I just wanted to know if this method is SEO friendly? Your reply will be most helpful.

Mark March 10, 2009 at 6:42 pm

Thanks for this info, I really appreciate it. I will use hyphens for sure!

Goran Giertz March 21, 2009 at 8:59 am

The only thing that I dont like about the hyphen is telling a person over the phone how to spell a domain. So many people dont know what a hyphen is and when you say dash they write it.

j0rd March 31, 2009 at 11:55 am

I’ve recently re-indexed a PR6 site which gets quite a few hits.

My site structure was using Dashes, but I had a bug in my Apache-Rewrite which allowed these two URLs to link to the same content

One-Two.html
One_Two.html

While all the links on my site linked to One-Two.html and these got indexed by Google first…but after a recent browse of the stats, I’ve noticed that Google has replaced 90% of my URLs in the index with the improper and not linked to One_Two.html. Weird!

My URLs to make more sense as “One Two” rather than “One + Two” as they’re usually a name with multiple words in it. Maybe google understands this and prefers to joint the words with an underscore because of this, rather than a non-associative joiner like a dash.

I’ve gone ahead and 301′d the _ to – and we’ll see what happens, but I’m almost tempted to keep the _ which google seems to prefer.

webtechnepal July 6, 2009 at 1:11 am

I prefer dashes.

Sherry July 19, 2009 at 11:01 pm

this is great information. But I have a question, do dashes work BETTER than regular strings of words that are not separated? I mean, can google see the separation there?

MRSA Treatment August 2, 2009 at 10:57 am

I’ve always preferred hyphens for page names – so it’s good that Google prefers them. I think it’s hard to see underscores, especially when viewed as a hyperlink – they blend in with the link. And thus other people can record your domain name incorrectly.

Goran – I totally agree with you – using hyphenated website names is not easy to get across to someone over the phone. People do not easily understand what a hyphen is. So, this is good to remember when choosing a new domain name.

Thanks for another excellent article Matt!

Tim Acheson August 10, 2009 at 8:03 am

I have given this a lot of thought over the years, and have reached the conclusion that dashes are not the best delimiter. Furthermore, 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

Man_Eating-Banana September 5, 2009 at 11:56 pm

to dash or not to dash this is Esperanto.

Tim Acheson article link has this to say:

“Yet the rules for punctuation in friendly URLs should be a decision made by editorial and/or business people, not technical people.”

and this

“I believe that rogue dashes in URLs are a transient phenomenon. The technology will nature.”

In my view this sounds to me as an issue of backward compatibility.

If Google evolves to new ways of ranking pages, what about more interesting languages that have the ” ‘ ” in their words for proper sound and punctuation and meaning. As in “Metacafe” in spanish this is rather wrong. It is missing the ” ‘ ” after cafe.

It is clear that programmers are taking on a challenge by deciding to rank lower a page title with a dash or not, but I disagree with the use of statements like “rogue dashes” and I really disagree very much with “rules for punctuation in friendly URLs should be a decision made by editorial and/or business people”.

We are challenging universal nature, by recording it electronically, we are challenging our very universe by curving our existence and creating a new way of communication that is not natural so limiting our search engines to using dashes only or considering that it has not mature because of a dash fault is not helpful. Rather I like to think of the generosity of programmer when they use backward compatible technology to not leave the previous works in a “dash”.

Cafe’ sound about good right now.

Steve September 8, 2009 at 7:51 am

Thanks for the clarification Matt. It’s always great to get the info direct from someone who works for Google.

Alex September 18, 2009 at 6:03 am

I just wondering if its works for all type of website …. but thanks for useful information

derek October 12, 2009 at 2:55 pm

what about url’s that do not have dashes or underscores. Just spaces. Are they penalized or how do crawlers recognize them or how is page rank affected?

John October 13, 2009 at 7:53 pm

thank you for clarifying that. For some weird reasons, webmaster started to use _ for the site urls. Time to get them changed. thanks again

Leave a Comment

If you have a question about your site specifically or a general question about search, your best bet is to post in our Webmaster Help Forum linked from http://google.com/webmasters

If you comment, please use your personal name, not your business name. Business names can sound salesy or spammy, and I would like to try people leaving their actual name instead.

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: Seeing nofollow links

Next post: Bloglines