Dashes, underscores, and CamelCase in your URL’s

I learned this the hard way at work probably about 8 months back. Take a guess which of the two Google doesnt like and cant understand? Thats right, dont use underscores ‘_’ or camel case ‘camelCase’ in your URL’s! Although URL’s arent the most important part of your site but they definitely do have an impact. To Google, as dash represents a space and thats what you should live by.


Need proof? Notice anything different about the two result sets?


http://www.google.com/search?q=main+page
http://www.google.com/search?q=main_page


Thats right. They are two different entities. The underscore doesnt create a space and therefore is NOT stemmed. This is a problem inherent to MediaWiki (my favorite wiki). Although wiki’s werent made for this purpose they have surely evolved into something different. Actually, as I am writing this now I just got the thought to make an Apache rewrite proxy to change the underscores to dashes. If I get it to work I’ll post my findings.


Learn from my mistakes. If you have the chance to make a rewrite or better yet start from scratch use dashes.

Share:
  • Facebook
  • TwitThis
  • Digg
  • del.icio.us
  • Google
  • Reddit
  • StumbleUpon
  • Technorati
  • E-mail this story to a friend!

Leave a Reply