Spaces, Underscores & Dashes - how to name files

Many people have opinions on how files should be named on the web, and specifically how words should be seperated. Do you use a space, an underscore or a dash?

Here's another opinion, with some rationale behind it.

File seperators - spaces, dashes or underscores?


Spaces are generally a bad idea with anything website related. Often spaces in URLs will be encoded as %20 (which looks ugly) or will cause some browsers to misinterpret the filename. Spaces in URLs should be avoided.

Underscores or Dashes?

Underscores work fine in URLs, and there is no technical reason why they shouldn't be used.
However, when a link containing an underscore is underlined (as links often are), the underscore looks the same as a space, and this makes it hard to know what it really is. Dashes, on the other hand always look like dashes, so I consider these the best choice for seperating words in files.

Dashes or Nothing?

The other option of course is to not seperate your words at all. This can work well also.
Google now gives additional algo weight to sites with the keywords in the domain name - the idea is to make it easy for small sites to rank well for their own name (as they should).
What invariably happened is sites like sprung up out of nowhere - domains obviously intended for search engines and not much else. I'm not recommending you do this on your main site, however you can use some of these concepts.


It has come to my attention that Google does not give weighting to words that aren't seperated with a dash. So if you register this won't help you rank for either "blue" or "widgets". However, registering will.
The choice now comes down to whether you go for the SEO friendly dashed domain name, or the more usable non-dashed domain. The correct answer varies for each site. Most sites will opt for the non-dashed domain because it's better branding.

Upper or lower case?

Whenever I give out a web address, people will invariably ask me if that's all lower case or not. For me, the answer has always been "of course". Why would you want to make life hard for yourself and use mixed case on a URL?
A few months ago, this point was reinforced when we moved a number of websites from Windows hosting to Linux hosting. Windows, being non-case sensitive doesn't care what case you use - both will work. Linux on the other hand is a different story - "About.htm" is totally different to "about.htm".
After spending several hours fixing broken links on these websites, this point was reinforced. Keeping consistently lower case will make life easier.


The best way to name files and pages is usually to do what seems logical. If we are talking about the "About Us" page, it's hard to beat "about.htm" for a filename. If you can come up with one word names for each page, this makes the question of what seperator to use somewhat redundant, and also makes it easy to tell someone a URL over the phone too.

Give some thought to how you name your pages and domains - no seperator is best for Google, but a dash is best for readability.

Harvey Kane

Digg StumbleUpon technorati blinklist furl reddit sphinn

Tags: seourlusabilityseo url usability