URL Format for e-commerce Sites.
One of the problems we see often with ecommerce sites is a less than ideal URL structure. As ecommerce sites are mostly generated by creating pages from templates and populating these pages with information from the database, they need to have parameters to find the information they need. For example, the two parameters might be product category ID and a product ID.
You might end up with a URL such as:
http://www.example.com/template.php?cat=2&prod_id=1234
which works but it not very search engine friendly. From this came search engine friendly URLs which would take a URL like the one given above and rewrite it to something that people might find more useful.
http://www.example.com/acids/hydrochloric-acid
This is better because it adds keywords for search engines and it follows a structure which humans can guess for other products. If we wanted sulphuric acid. Then we could have a stab at what the URL might be.
However, other problems are created with search engine friendly URLs. One of the major problems is duplicate content. This can occur when two or more URLs lead to the same page of content. In ecommerce systems this is can occur when the same product appears in different product categories or in the special offer section of the site. How should you define category URLs and product URLs so that this doesn’t become a problem?
Category pages should be defined as http://www.example.com/category
subcategory pages http://www.example.com/category/subcategory
product pages http://www.example.com/product
This is a good system because it allows you to create shorter URLs that remain descriptive and easy to guess. For search engines the URLs are shorter but descriptive. It also means that the product URL is the same regardless of which category it came from.
If you are going to change your URL structure then you should be aware there is a good chance that in the short-term you will lose rankings while the new URLs are indexed. You will need to make sure that all the changed URLs are permanently redirected (301 redirected) to their new locations.
Sir Pumpkin Longshanks
Programmer, Research and Development









I’m in the process of putting together a new structure for URL’s of an e-commerce website, and found this article very helpful. However!!!
What happens if you change the name of a category? Or the name of a product? I’ve read some articles saying that putting a unique identifier in the URL can help automating 301 redirects, but ideally, for SEO, you wouldn’t want any kind of information in the URL that isn’t relevant. What are your thoughts on this?
Also, you would need to identify the primary category for a product, if it’s in more than one category. You need this if you’re planning on placing the category name anywhere in the product page, which is true for most e-commerce sites. Then depending on how the visitor visits the product page, the ‘correct’ category is shown.
At least it’s great to see someone else who, like me, is not planning on putting the category name in the URL of a product! Of course this does require the product to be well described/named.
By Michel H September 30th, 2009