Dynamic URL 301 Redirecting

Aug 26, 2004 • 8:30 am | comments (1) by twitter Google+ | Filed Under Database Driven & Dynamic Site SEO & Tips

For those that know me, I am a firm believer that going the dynamic route, when it comes to site development and maintenance, is the best and most efficient method. Many web designers and seos don't share my passion. However, this is a dynamic web site issues forum, so I thought I share a challenge I came across.

My company has built dozens of e-commerce sites, all very dynamic. We empower the customer by allowing them to manage the whole site. So if they want to add a category, they can do it. If they want to add product, pictures, new sections, brands, and so on - they can do it without calling us. Actually, I recently and finally finished an article I named Search Engine Friendly E-Commerce Catalogs which discusses many of the basics. Here I would like to touch on one area of the dynamic e-commerce site, the URL.

Our e-commerce sites use mod_rewrite to make search engine friendly and keyword rich URLs (not that I feel keywords in the URL make a big/any difference in rankings, but I feel they can be helpful with usability and click-through rates). So what we do is dynamically build the URL based on the name of the product. Let me give you a real life example; look at: http://www.smarttuxedo.com/Tuxedos-1/Sutton100-Wool-Single-Breasted-Tuxedo-1-Button-Shawl-Lapel-Available-1-Button-Notch-and-Peak-Lapels-45.html.

That URL is way long! Right? Well look at the product name in the h1 tag or the title of the page. My client gave that product a 17 word title! Now that is not good for usability, not good for seo and not good to look at. So I told my client to go into the products and shorten them to about 5 words. he said ok.

The problem is, when you would change the product name, the old URL (the one the search engines indexed) would work and the new URL would work. So the search engines would re-crawl and find the new URL, but also see that the old URL worked. My client would have two pages with exactly the same content on them. Not the best idea.

Solution: We built a dynamic 301 redirect which automatically redirected one from an old URL to the new URL. How does it work? Simple... If the URL does not match the title of the page, redirect (301 style) to a URL that matches the title of the page. For example try; http://www.smarttuxedo.com/OLD-CATEGORY-URL-1/OLD-PRODUCT-URL-45.html

I have posted this at Search Engine Watch, sorry for pointing out the threads I have started, but I really think it will be helpful for others.

Previous story: Hackers Hit Gmail
blog comments powered by Disqus