Monday, April 25, 2011

Using rewriteable URLs to help user experience and SEO

It doesn’t take much to send a story viral on Twitter, but a
recent quirk in the URL system at The Independent saw a flurry of humorous web
links scattered across the Twittersphere.

I was first alerted to the incident when one of our leading
techies at dotCommerce, Stuart Gill, sent
me a link that was doing the rounds on Twitter, seemingly exposing an
entertaining URL on a story about Kate Middleton’s head
in The Independent.


Namely:


http://www.independent.co.uk/life-style/food-and-drink/utter-PR-fiction-but-people-love-this-shit-so-lets-just-print-it-2269573.html


While it
initially looks as though a sub-editor at the paper has been neglectful, this
is actually an example of a little URL rewriting feature that is common to lots
of content management systems.


As long as you have the numbers at the end, you
can put anything into the URL and it will still work normally.


For
example:


http://www.independent.co.uk/life-style/food-and-drink/why-we-are-cancelling-our-Guardian-subscription-2269573.html


or


http://www.independent.co.uk/life-style/food-and-drink/dotdigital-group-wins-national-business-awards-and-all-the-oscars-2269573.html


Not just for
the URL of it


Laughs
aside, URL rewriting is something that we, and many other websites, use quite
frequently. Why is this? At the basic marketing level, it allows us to generate
memorable URLs for campaigns or print marketing.


But,
with database-powered ecommerce sites, things get more interesting and the
trick becomes a lot more useful.


Addresses
UnfURLed


Take
Go Native for example, a website offering serviced
apartments we developed. Pages on the site are constructed automatically based
on the contents of a central database. However, this means you end up with URLs
classics like this:


http://www.gonative.com/property_searching/property_information_page.aspx?propertyId=10494


This
is actually an information page for the Forbes
Building in Aberdeen (their ID is 10494).


But
it’s a really ugly URL, so we do some magic using rewrites to change it to the
much prettier address:


http://www.gonative.com/apartment/the-forbes-building/10494/.


Note
you can put any text in the URL you want, and it still works:


http://www.gonative.com/apartment/land-of-the-gods-with-a-double-en-suite/10494/


Behind the
Scenes


So
what’s going on here?


The
logic is built into the URL format so that, no matter what is in the text
field, it’s the number ID that is searched for.


So
when the machine sees http://www.gonative.com/apartment/$text$/$number$/, it takes a look at the
last bit of the URL and returns the following:


http://www.gonative.com/property_searching/property_information_page.aspx?propertyId=$number$


Naturally,
the same works in reverse to ensure that the more complex URL is shown in
simple, user-friendly terms.


What are the
advantages?


1. It looks professional and it’s reassuring to users to see that the
URL contains the name of whatever they were searching for.


2. Google does catalogue these pages if they become popular (as the Independent found) so there’s SEO value
here. If the name of the search is in the URL, this may help your rankings. It
also means you can keep the URLs even if you change your CMS – so you don’t
throw away all your SEO juice.


3. It can, in some circumstances, help to secure your site. If URLs
become less easy to guess by potential hackers


At the end
of the day we’ve all had our fun, but let’s not forget the valuable role this
function serves for marketers every single day.


Oh go on
then, one more:


http://www.independent.co.uk/life-style/food-and-drink/INSERT-SOMETHING-FUNNY-HERE
-2269573.html

"

No comments:

Post a Comment

Disqus for ully's online marketing

Disqus for ully's online marketing