.

Converting from Query String to SEO and User-Friendly Directory-Style URLs

Upon Dogster’s launch I was hardly concerned about search engine optimization (SEO). Dogster would be a site that people wanted and found or had no idea existed at all. OMD how things have changed.

Fortunately, we’ve had the excellent help of SEO firm and Web2.0 start-up ACS-SEO. You may know them of the extremely informative CrazyEgg and the to-be-live Serph and SiteBlimp web services. The fact they are trying to promote their own properties on their budgets ensured they would care about SEO the same way we do.

At our size now, SEO benefits are so clear. Every day on average 55 new members register after finding us in a Google search, 15 from Yahoo! Since 1 in 4 members that joins our sites become a lifer no matter where they arrive from, the more registrants each day, the more people that have found their online home.

The URL project has been a bear. Here is an example of a URL change for a forum Main Topic

old: www.dogster.com/forums/main_topic.php?t=5012
new: www.dogster.com/forums/Behavior_and_Training

The big trick is that the old URL has do redirect to the new one and also send a 301 ‘Permanent Redirect’ header message. Google penalizes a page rank if there are two distinct URLs pointing to the same exact content. So the actual change has to happen at once.

One annoying problem was trying to handle the URL redirect and the 301 redirect using only mod_rewite rules in our .htacess file . The problem is you have an circular situation. The rule to match the old URL redirects to the new URL which redirects back to the original URL (invisibly to the user) which then was activating the first rule again.

The solution was to put the 301 ‘Permanent Redirect’ header response atop the original php file to the new directory-style URL. The mod-rewrite rule catches the new request and but invisibly redirects to a near-identical php file with a different name. I’m sure there’s prettier, but it does the trick.

Here are some more examples of converted URLs.

A member’s diary URL is now longer buy has more many more keywords.

old: dogster.com/diary_entry.php?pet_id=312492
new: dogster.com/dogs/312492/diary/One_day_the_world_shall_be_mine

A Catster subscriber’s photobook:

old: www.catster.com/photos/?i=397668
new: www.catster.com/cats/397668/photos

Though not live, we’re on the verge of changing pet pages:

old: www.catster.com/pet_page.php?i=397668
new: www.catster.com/cats/397668

(We would have preferred to use the pet’s name as the unique identifier, but it’s far too late to enforce a unique pet name or unique username policy now)

It’s too soon to say the exact benefit of these (and many many other SEO-related changes we’ve made) but here are some results from Google today for Dogster against the following phrases:

  • ‘dog diaries’ - 1st
  • ‘dog profile’ - 2nd
  • ‘dog site’ - 2nd
  • ‘dog photos’ - 3rd
  • ‘dog photo’ - 4th
  • ‘dog picture’ - 5th

We didn’t even break the top ten on any of these before we began this effort.

Share it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Facebook
  • Google
  • Reddit
  • del.icio.us
  • StumbleUpon
  • NewsVine
  • SphereIt
  • Ma.gnolia
  • Live

One Woof

  1. Hiten Shah

    We are glad to be here to help you guys get some well deserved search engine love.

Leave a Reply

fields marked with * are required

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>