Archive for November, 2009

Pits and Progress (and URIs for Google)

Tuesday, November 17th, 2009

Oops! I’m sure that all three of you readers have been saddened by the lack of Wordpress secrets or indeed, the lack of anything on this beautiful blog. It’s been since May!! Fortunately, that means that Matt and I have been busy doing actual work. One of our fun projects lately has involved SEO scripting (!) for a local business using an entirely undocumented CMS. The content management system in question was creating really nasty URIs (think index.php?id1=123&id2=231&id3=432) and we suspected that we could improve search engine traffic significantly by cleaning up the URIs a bit. Sure enough, index.php?gobble=32&dy=9&gook=12 became a/clean/path/name/with/really-nice-words and Google ate it up. The best part is, we didn’t need to touch the CMS source code at all.

How, you ask? It was simple, really. (So simple in fact that I wish every CMS in existence would just do it, and rid us of dirty query strings forever!) All it took was a buffer and a conversion table and some .htaccess magic. We were lucky in that the CMS was newly installed, so the amount of incoming external links using ugly URIs were negligible. That meant all we had to do was clean up the links on the site (by running every page through a buffer and replacing URIs), and then deconstruct the nice URIs into the appropriate queries on server request. We ended up doing the last bit with a dynamically generated (from PHP) .htaccess file. Oh yeah, and the nice URIs were easy to make since we just pulled their corresponding page titles from the CMS database and “pathified” them (stripping special characters, converting to lower case and subbing spaces for hyphens did the trick).

All in all, it was a fun little project. Most importantly, it’s only been a month and we’re already seeing search engine results improve. Another lesson that every aspect of a site’s presentation matters to the Google.

Also, I left out code examples for readability’s sake but if you’re interested please don’t hesitate to ask!