Underscores or hyphens? Which is a better keyword separator for page and file names? The main concern in this study is SEO, but I’ll also look at the usability aspect.
How do search engines see it?
To Google’s search engine, underscores don’t separate words, it’s its own character, similar to a number. Google understands css_tutorial as one word, and in a search, gets results for just that. Hyphens, on the other hand, separate keywords into two distinct words. Here’s an example: Using parenthesis in a Google search gives results with exactly those terms. If you search “code chirps” and “code-chirps”, you get nearly the exact same results. If you Google “code_chirps”, there are not results at all! So it looks pretty simple. As far as SEO goes, you should be using hypens.
How about humans?
Dashes seem to be more usable. The biggest reason is that when text including an underscore is underlined, it can be difficult to distinguish whether it’s a space or an underscore. And, when typing a hyphen, you only have to hit the key, not “shift” also. 😉