Designing URLs For eCommerce Benefits

A recent eCommerce project brought about the challenge of re-designing the URL involved with the internal pages of the site. Straight away, my internal thoughts said, “Keywords present, dashes seperated, lowercase, nice clean URL’s. Simples!” But this nagging feeling inside, wouldn’t go away. I wanted to make sure what I had read and practiced was actually the best way to proceed in today’s forever changing search environment.

I first want to highlight to those reading what, up till this point, is the difference from a clean URL to a dirty URL.

A Dirty URL real life example :

http://www.xxxx.co.uk/store/cart.php?c=7&p=946

Obviously, I have changed the domain to protect the innocent. But looking at that URL there are a few glazing problems that leap from the page. Nobody, is ever going to remember that URL when retyping into the address bar. There are obvious security issues with the URL, primarily the language used to write the code is available for a hacker to exploit. And anyone picking out that URL and listing it as a link is not passing on any benefit via anchor text back to the site, unless the domain has some rich keywords within it.

Further reading about Dirty URL’s : www.seoconsultants.com/articles/1000/urls.asp

A Clean URL example :

http://www.xxxx.co.uk/dvds/x-men

OK, I cleaned up the offending dirty URL and now we can see the obvious advantages which are present. Gone is the querystring data (all the parameter info found after the ?) We have also removed the .php extension (the big giveaway of our coding source) added keyword friendly category and product descriptions for usability and URL linkage advantages and finally removed any ending file extension from the URL completely.

The last part was something which I churned over and over in my mind again. What I did previously with eCommerce URL’s was end them as .php. After a bit I then further reworked the .php to rewrite as a .html extension with the following in the .htaccess file :

Options +Indexes
# RewriteBase from .php to .html
RewriteRule ^(.*)\.html$ $1.php [L]

This way I could continue to use my database calls, include files and keep the page dynamic while displaying it as a flat file .html page. Now, here is where my judgement was being questioned. According to the W3C, you should design your URI’s for longetivity – lasting well into the future:

It is the the duty of a Webmaster to allocate URI‘s which you will be able to stand by in 2 years, in 20 years, in 200 years. This needs thought, and organization, and commitment. (source : www.w3.org/Provider/Style/URI)

They (W3C) proclaim that you might not be using .html to display that page in 20 years time but you might want links pointing to that page today to remain.

Of course, to me is where the 301 redirection comes into play. However, according to Google, for optimum experience you should contact the webmaster of the site that is linking to you and tell them that the page url has changed (Source : Google Best Practices).

But what about that .html extension? Well for future eCommerce Web Design projects it will be gone. Its purpose has been served and lets look at the benefits we create without its appearnce in the URL : we shorten the URL without the .html extension; it makes it even more manageable for linking purposes; adheres much more to usability guidelines; if we decide to upgrade the current code to a new technology, we can still do so without worrying about the URL structure in the future. Next time you look at the URL structure of a webpage, think to yourself just how well designed is it to be found in years to come…

Comments

2 Responses to “Designing URLs For eCommerce Benefits”
  1. PoLR says:

    Thank god you say you changed the domain name, I thought you were working for a dodgy site with all those x’s ;-)

Recent Entries

Shout Outs

Worth A Look

follow nsm on twitter
follow nsm by rss
connect with nsm on facebook