Nov 19, 2006
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.

Spaces
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 www.mesothelioma-viagra-casino-mortgage.com 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.
Update:
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 bluewidgets.com this won't help you rank for either "blue" or "widgets". However, registering blue-widgets.com 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.
Usability
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.
Related Articles
- Writing decent URLs
- Optimizing Webmaster Credits
- AJAX is here
- Ferrit SEO their site properly - sort of?
- Microsoft offers to buy Yahoo!
<< SEO Articles index < Pictures 4 Schools | Reducing code bloat >
Comments
Harvey - May 3, 2007
Really?
I thought the 3 letters and fact it wasn't case sensitive was easier than most CAPTCHAs, but point taken - I don't get much automated spam so I might go for an easier font.
I'm told on good authority that Google's bolding of search results is just a display script - ie the fact it's bolded doesn't automatically mean it helps the page rank in the main algo (sorry, can't provide any info to support this right now).
My personal experience is that it's rather hard to beat a domain that contains the phrase you are after. Is this a function of lots of targeted link text, or is there an algo benefit for having words in your domain name?
I used to stress about which words were in the domains I bought, but now I just focus on buying something that is easy to say, easy to spell, short, catchy and not too heavily focused on a niche. If I'm going to go to the trouble of powering up a domain with links and content, it needs to be more than just a name with some keywords in it.
I thought the 3 letters and fact it wasn't case sensitive was easier than most CAPTCHAs, but point taken - I don't get much automated spam so I might go for an easier font.
I'm told on good authority that Google's bolding of search results is just a display script - ie the fact it's bolded doesn't automatically mean it helps the page rank in the main algo (sorry, can't provide any info to support this right now).
My personal experience is that it's rather hard to beat a domain that contains the phrase you are after. Is this a function of lots of targeted link text, or is there an algo benefit for having words in your domain name?
I used to stress about which words were in the domains I bought, but now I just focus on buying something that is easy to say, easy to spell, short, catchy and not too heavily focused on a niche. If I'm going to go to the trouble of powering up a domain with links and content, it needs to be more than just a name with some keywords in it.
Dan - May 4, 2007
Yeah, I realize they've just got an automated way of bolding, so I suppose it doesn't prove anything.
Still, they obviously care enough about it to include the code necessary to identify those words-within-words in the URL. . . and they certainly don't run the main content through that same filter.
One easy way to see that is to search for three keywords in Google all at once that I sort of target - Easel, Art, and Tutorials. In the snippet for my website, the URL gets broken up and bolded, but the main title does not.
On the other hand, like you say, it's just a small part of the puzzle and I agree that it won't overpower good in-page SEO and incoming links with that keyword.
Still, they obviously care enough about it to include the code necessary to identify those words-within-words in the URL. . . and they certainly don't run the main content through that same filter.
One easy way to see that is to search for three keywords in Google all at once that I sort of target - Easel, Art, and Tutorials. In the snippet for my website, the URL gets broken up and bolded, but the main title does not.
On the other hand, like you say, it's just a small part of the puzzle and I agree that it won't overpower good in-page SEO and incoming links with that keyword.
Robert - NJ Tourism & Event Guide - Oct 5, 2007
If I only knew then what I know now. I can't afford to go through and rename all my pages to the hyphen format, so what I am doing is any new page I create uses hyphens. For instance, this page - http://www.aboutnewjersey.com/DiaryTours/winery-tour-nj-10_4_07.php which went active today.
The photos are also saved with hyphens now. However I have read that Google may start penalizing sites for using hyphens because so many spammers use it. You can't believe everything you read about SEO though. So I'm not sure what I should do.
As for having hyphens in the domain - I wish I did know that before also. I could have easily have used About-New-Jersey.com as the URL domain name - but still on all letterhead, business cards, etc used "AboutNewJersey.com" I just don't think at this late date it would make sense to do that. I'm still waiting for google to restore the site to it's proper placement from when I changed the static .htm to dynamic .php pages back in July. (I never made such a system wide change that affected so many pages at one time) I went from 1200 visitors a day to 300. I think once a site is up, the name of the file becomes less of a factor in where it gets indexed on Google.
The photos are also saved with hyphens now. However I have read that Google may start penalizing sites for using hyphens because so many spammers use it. You can't believe everything you read about SEO though. So I'm not sure what I should do.
As for having hyphens in the domain - I wish I did know that before also. I could have easily have used About-New-Jersey.com as the URL domain name - but still on all letterhead, business cards, etc used "AboutNewJersey.com" I just don't think at this late date it would make sense to do that. I'm still waiting for google to restore the site to it's proper placement from when I changed the static .htm to dynamic .php pages back in July. (I never made such a system wide change that affected so many pages at one time) I went from 1200 visitors a day to 300. I think once a site is up, the name of the file becomes less of a factor in where it gets indexed on Google.
Harvey - Oct 5, 2007
Hi Robert,
The advice I have been giving people lately is to leave their URLs alone unless they have spaces or querystrings in them. Matt Cutts of Google has said that underscores will soon (if not already) be an acceptable word separator.
This article does need to be updated (one of the issues with blogs). I say above that Google doesn't give weight to domains which have no separator between the words eg yourdomain.com - based on recent experience, that statement is wrong. I have lots of domains without dashes ranking far better than they should because the domain matches the search query. And no dash in the domain is a clear winner for usability and branding.
The advice I have been giving people lately is to leave their URLs alone unless they have spaces or querystrings in them. Matt Cutts of Google has said that underscores will soon (if not already) be an acceptable word separator.
This article does need to be updated (one of the issues with blogs). I say above that Google doesn't give weight to domains which have no separator between the words eg yourdomain.com - based on recent experience, that statement is wrong. I have lots of domains without dashes ranking far better than they should because the domain matches the search query. And no dash in the domain is a clear winner for usability and branding.

Post Comment
We welcome comments on this article, provided they have something to contribute. Please note that all links will be created using the nofollow attribute. This is a spam free zone. HTML is stripped from comments, but BBCode is allowed.











Dan - May 3, 2007
Do you think this indicates something?
PS, that CAPTCHA was harder than most. . .