his is an often asked question. It helps to know the answer early-on since it can save you a ton of work later. Conventional wisdom tells us to avoid using empty spaces and underscores in URL addresses and file names. This is especially true for image titles since we often describe an image with a keyword if it’s applicable for SEO reasons.
I have used underscores for years, but no more since I’ve learned there are better choices, namely the hyphen.
Let’s take a look at how empty spaces in URLs are viewed in Internet browsers. Let’s assume this webpage URL is: 45degreeslatitude.com/hyphens or underscores.html In a browser it would look like this:
Pretty unruly, wouldn’t you agree? Also, you should avoid special characters (*&^@!)as well as capital letters. Use lower case letters and hyphens instead.
Hyphens are much easier to read by humans too (easier than underscores). And, search engines love hyphens, and that is largely why we post content on the Internet – to be found. Google treats hyphens as word separators so words in a URL or file name can be read individually.
Underscores do the opposite, they combine several words together into one word which Google may treat quite differently. For example, if a filename was ‘yellow_porsche’ Google would combine the words to yellowporsche. If it was one of your keywords before it is no longer. If the filename was ‘yellow-porsche’ the division in words is retained having a different effect on SEO.
This is an old quote from Google’s Matt Cutts video way back in 2011 concerning hyphens:
“If you are going to make a site and you’re starting fresh, so you’ve got a blank slate to work with, I would probably go ahead and go with dashes. I would continue to go with dashes at least for the foreseeable future.”Matt Cutts
Use hyphens instead of underscores and save yourself time in the future.