Tidbits: Underscores vs. Dashes

January 25, 2008

There has been some discussion recently about how to properly name the files on your website and server. An obvious decision would be to name them something that makes sense to you. This will help you stay sane and organized but the question I’d like to ask you is “Do your file names make sense to the search engines?”.

If you’ve build a website I can guarantee that you’ve made a decision regarding the name of your site, a directory or a file name. The most important thing to remember is to name your files with words that describe the content; you want to do this in as concise manner as posssible. This will certainly help the search engines determine what your content is about.

A second consideration is how you space out multiple words within a directory or file name. You shouldn’t leave actual blank spaces anywhere; so what’s the best practice? According to Google, they’re spiders separate words efficiently by punctuation. So a best practice is to use a dash between words instead of using an underscore or letting the words all run together. Underscores are not punctuation so they should be avoided.

Google is a smart animal though and it’s a good bet that they know the difference between words if they’re all running together like they tend to do in your domain name. As a general best practice I would recommend using a dash and shy away from any other separators. Google specifically recommends this:

Webmasters asked about the difference between how Google interprets underscores and dashes in URLs. In general, we break words on punctuation, so if you use punctuation as separators, you’re providing Google a useful signal for parsing your URLs. Currently, dashes in URLs are consistently treated as separators while underscores are not. Keep in mind our technology is constantly improving, so this distinction between underscores and dashes may decrease over time.

So in summary, be descriptive, concise and separate your file names with a dash when building out your website pages for SEO.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

AddThis Feed Button AddThis Social Bookmark Button

Comments

Got something to say?