Dashes vs. Underscores in URLs
The debate over whether to use dashes or underscores to represent spaces in URLs is rather heated in the web development community, but not quite as extremely so as that of whether to use tabs or spaces when indenting code. So, what is better to substitute for spaces in URLs, dashes or underscores?
The simple answer is that, never mind what Google prefers, underscores are the right way to go. Why?
1) Hyphens Already Mean Something
Hyphens and dashes are actually slightly different, but in practice everybody just uses the same character, ASCII number 45, the hyphen-minus. So let’s just pretend they’re the same. The strongest argument against dashes is that they already mean something in English! “Mother-in-law”, “X-ray”, and “twenty-one” are all single words. Inserting a hyphen in the middle of a sentence can completely change its meaning. You can’t just ignore those rules, any more...