Having discussed not using spaces in the filenames of documents which might end up on the web, as well as sticking to lower case letters, I’d like to finish this short series on naming documents and files by looking at alternatives to spaces. There are three options commonly available, which are usually given consideration when dreaming up a website domain name, but not always thought about when saving everyday files. They are the hyphen, the underscore and… nothing at all.
There are two things we need to consider in our selection: the human (prospect) seeing a filename, and what the search engines can deduce about the web page or document from the name. Fortunately, I believe the same choice works best for both.
It’s obvious that search engines will come across the filename, but what about web users? They’re most likely to see it in search engine results (the green bit below), and I think it’s an significant factor in their choice of which link to click. Something descriptive which is easily read can help a lot here. For example, if you’re looking for a guide to 4-20mA aerospoace widgets, the title of this result looks good, but the green filename clinches the deal:
I think that the option of ignoring word spaces is fine in a domain name (e.g bluewidgetcompany.co.uk) but doesn’t help the user or search engines in file names, e.g: bluewidgetcompany.co.uk/howourbluewidgetswork.pdf
…so let’s rule that option out, leaving us with the hyphen and the underscore. From the user’s point of view, the underscore can be confusing, because when used in a link (normally underlined), it just disappears or looks messy:
So what about the search engines? It turns out that the most recent information we have from Google comes down firmly on the side of the hyphen. The video below from Google’s Matt Cutts explains why, but the result of what they do is that “blue-widgets” is read as “blue widgets”, while “blue_widgets” is read as “bluewidgets”. So for search engines, as well as humans, the hyphen looks like it’s the winner. A document about Blue Widgets should be called blue-widgets.pdf.