Blogging Computing Rants

Blog Titles With Underscores and SEO

Over the past few days I’ve been messing around with Google Webmaster Tools in an effort to make sure that all the little bugs and issues from my major blog upgrade, from b2evolution to wordpress, a few months back are ironed out.

As always, there tend to be silly little things that are the real pest – misspelled words, poor grammar, obscure comment links and the odd stray feed needing a redirect, all of which were quickly sorted out. After first digging into a few Apache mod_rewrite rules, of course.

I was reading through some tips on the Google Webmasters Help pages when I stumbled on this gem: “We recommend that you use hyphens (-) instead of underscores (_) in your URLs.” Say what? I looked through my archives, and discovered to my dread that all my old content used underscores in the titles. “Eish. Oh well, this is Google, they can probably figure it out anyway – it’s a simple character substitution in their algorithm. It probably doesn’t matter that much.” I thought. But then I picked up in a guest blog entry by Vanessa Fox on Matt Cutts site that there is a distinct difference in the way Google handles underscores and dashes:

‘”african-elephants.html is seen as two words: “African” and “elephants”. african_elephants is seen as one word: african_elephant. It’s doubtful many people will be searching for that.’ This statement alone indicates a huge difference in exposure because of this one trivial character.

That made up my mind to try the big change, but it would require jumping through a few hoops:

1) Changing all the old urls to new urls with dashes instead of underscores. That’s a lot of editing.

2) Redirecting any existing requests for underscore-urls to the new dash-url. That’s a lot of redirecting.

3) Hoping like hell that it worked.

Fortunately problem 1 could be solved by a simple mysql command:

mysql> update wp_posts set post_name = replace(post_name,'_','-');

And problem 2 was easily resolved with the Dash Redirect WordPress Plugin.

I suspect the Dash Redirect Plugin can actually fix both issues at once, but I only discovered this after I’d already changed my urls.

Today I’m feeling good karma from the synchronicity of my blog.

3 replies on “Blog Titles With Underscores and SEO”

Ah yes, I remember blogging about this some time last year, it’s a question which pops up all the time! Good on you for taking the time to fix it!

Have you seen an increase in traffic?

It’s been a bit difficult to tell if there has been an increase purely due to changing from underscores to dashes as I’ve implemented a number of other changes while going through this process.

I can however say that the keywords listed in Google Webmaster Tools (“what Googlebot sees”) are a lot more accurate and cleaner than they were previously, which must have some sort of positive effect on search ranking and relevance.

Leave a Reply