Ideally, none, but sometimes you have to separate words for greater clarity. Since you cannot have spaces, it’s better to have dashes. There are many content management solutions and online publishing platforms that use underscores to separate words in long URLs but it’s been noticed that the search engines prefer dashes over underscores although according to a recent news Google will treat underscores as word separators, which was not being done previously. When I did some research I found Google still doesn’t like underscores, as Matt Cutts says in a recent post:
If you read Stephan Spencer’s write-up,
he sayssome people thought that underscores are the same as dashes to Google now, and I didn’t quite say that in the talk. I said that we had someone looking at that now. So I wouldn’t consider it a completely done deal at this point. But note that I also said if you’d already made your site with underscores, it probably wasn’t worth trying to migrate all your urls over to dashes. If you’re starting fresh, I’d still pick dashes.
Anyway Yahoo! and Microsoft treat underscores as dashes that are in turn considered word separators.
Google on the other hand thinks (at least as of now) that an underscore is just another character and hence a part of the word. So web_designers for Google is not equal to “web designers” whereas it considers web-designers as “web designers”.
Dashes work well for URLs having many expressions, for instance http://www.yourdomain.com/affordable-web-design-service. This is I would say far better than http://www.yourdomain.com/affordablewebdesignservice as it will be difficult to figure out both for the search engines and your users. Your domain name, on the other hand, should be a matter of convenience (here too, the underscore is ruled out). You can have both dashes and no dashes.