EJM Designs Limited Blog

Saturday, January 31, 2009

Underscores and Hyphens: One Important, Often Ignored Rule

I recently ran into someone on LinkedIn who was asking about some best practices when it comes to information architecture. I put in my two cents and, as an afterthought, added that he should make sure that he use dashes instead of underscores in page names when separating words.

The gentleman replied in a mildly irritated manner, asking how I knew that and if I was right that it would be bad for many of his colleagues who use underscores.

I've known this for a couple years, so in searching for a solid reference for the man, I stumbled upon a reference from Mr. Guru himself, Matt Cutts.

The thinking goes something like this: because of geek programming roots, Google wanted to be able to index the character "_" and still does. What does this mean?

Say you have a page on your website explaining your web design services and title that page

web_design.php

The name of that page will only be indexed by Google as the string "web_design" because the underscore is judged as a relevant character, just as if you put a "9" in there instead. It's people-readable, not Google-readable.

Note: this is not to say that the content on that page, title tags, etc. would not provide enough relevance for the page to be listed. It might. But we are talking strictly page name indexing.

Of course you know what's coming. You're going to create that same page but name it

web-design.php

Now Google gets that extra nugget of relevance that the page is named with the words "web" and "design." Ostensibly, the name itself will be triggered by searches for "web," "design," and "web design" whereas the previous name was bound with the "_" character.

It may just be a part of your overall relevance, but as anyone who works in web design and search engine marketing knows, leverage is leverage and every bit of weight on your side helps.

So now you're either saying "whew!" or "OMG! How do I fix this!" Relax. Take a breath. Have a cocktail. It is Saturday. Whatever you do, don't just rename all your files. That would be BAD. Yes, all-caps BAD.

On Monday morning we'll discuss information architecture restructuring and permanent redirects in order to minimize any ranking damage.

No comments:

Post a Comment