What do search engines presently prefer us to use as word separators in URLs: dashes or underscores? Should I use http://example.com/dash-underscore or http://example.com/dash_underscore?
-
Also see - http://stackoverflow.com/questions/119312/dash-vs-underscore – Spongeboy Jun 28 '11 at 06:40
3 Answers
Search engines tend to treat them differently. Google likes to treat two words joined by an underscore as a single word, but dashes are considered to be seperating puntuation. Try it out yourself!
I tried search for search_engine and search-engine. The first gave me pages and urls with that exact phrase, the second was a more general search, treating the dash -
like a space.

- 12,177
- 9
- 69
- 105
A lot of the blog sites nowadays build URL slugs using dashes as opposed to underscores as it is a lot easier to read so I wouldn't be surprised if search engines score dashes higher on the results than underscores.

- 2,065
- 1
- 24
- 24
Use hyphens.
I have asked several SEO consultants and they always say to use hyphens in URLs for separate words. That seems in line with practices on most commons sites I've looked at.

- 21,546
- 5
- 36
- 52