When you are building URLs that should be legible for users and search engines and you do it automatically from the content, what's the best way to represent blank spaces? Hyphens (this is what StackOverflow uses)? Underscores? Any other? Does any of those make a different for SEO?
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
The space character is unsafe because significant spaces may disappear and insignificant spaces may be introduced when URLs are transcribed or typeset or subjected to the treatment of word-processing programs.
The whitespace should be ignored when the URI is extracted. For robustness, software that accepts user-typed URI should attempt to recognize and strip both delimiters and embedded whitespace.
Change the Path on the Filesystem If changing the filesystem is an option, the easiest solution is to simply to change the filesystem path to avoid white spaces, allowing the in-database URIs to match. If the filesystem path doesn't have spaces, MLCP won't need to adjust the paths to make them match.
Both are valid URL characters and both have their pros and cons.
Pro dash
Google recommends dashes, and here is what Matt Cutts from Google has to say about Dashes vs. underscores.
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.
Pro underscore
Another advantage of dashes is that in proportional font they take less space that underscores. Compare:
It's not a lot, but every little helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With