Enter a search term such as “mobile analytics” or browse our content using the filters above.
Check your spelling or try broadening your search.
Sorry about this, there is a problem with our search at the moment.
Please try again later.
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.
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.
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.
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:
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:
Note you can put any text in the URL you want, and it still works:
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:
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: