Investigation – SEO permanent redirects for old URL’s?

Audience

Everyone

On the project I am currently working on we want to change the nasty http://northwind.com/products.aspx?ProductId=1 to a nice friendly URL on the website. This is pretty easy and can result in nice URL’s like http://northwind.com/products/BigGreenTeddyBaresFromParis.aspx.

See Also – Solution – SEO permanent redirects for old URL’s?

Updated #1 January 5th, 2010: – As suggested by Adam Cogan, I changed the title and added a link to the Solution post.


This has already been implemented by the CMS system that we are using, so what is the problem?

The problem is that Google thinks the URL to “Big Green Teddy Bares from Paris” is http://northwind.com/products.aspx?ProductId=1 and we need to tell them that it is now http://northwind.com/products/BigGreenTeddyBaresFromParis.aspx. The URLs’ are changing for Search Engine Optimisation (SEO) reasons, but we do not want to loose any of the raking accumulated over time on the old URL’s.

We want to use Rewriting and not Routing because with rewriting the change is handled before it is passed to ASP.NET.

Rewriting in this case is like reverse URL Rewriting and during this process I need to lookup the database to find the new KEY (“BigGreenTeddyBaresFromParis”) and map the URL with the “ProductId” to the new “ProductKey”. If we also return a permanent redirect (301) then Google will learn the new location of the page and keep any ranking data associated with it intact. This is key as we do not want to start from scratch.

There are two official IIS7 rewrite engines that were recommended to me:

  • URL Rewrite
  • SEO Toolkit

URL Rewrite

You an install URL Rewrite from the “Web Platform Installer”, and it has very good integration and is easy to configure within IIS. This makes things a lot easier, but does it support 301 redirects?

image 
Figure: Adds an option right into the IIS interface

image
Figure: You can easily add new rules through the integrated UI

image 
Figure: UI supports 301 redirects, but it does not seam to have any way to load from a database.

Without a way to load from the database there is no way it will solve the problem, and a quick Google shows that it does not support it. The closest it can get is using a key value pair mapping file, but with 30,000 entries I do not think that will perform well.

If you look at Developing Rule Template for URL Rewrite Module you will see that you can only work within the set of options that are provided by the core functionality and can’t create a new feature, like loading the mappings from the database.

SEO Toolkit

Having looked at the bumph for the SEO Toolkit, it does not look like it provides any of the functionality required.

Conclusion

The conclusion is that neither the SEO Toolkit, nor the URL Rewrite Module are of any use in this case. There are now two options, I can roll my own rewriting framework or use another one that already exists that supports extensibility. One such URL rewriting framework that spring to mind is UrlRewritingNet.UrlRewrite which I have used before, but it has not been updated since April 2009. I have emailed the guys to ask them is they are still using/ working on it.

Even though it has not been updated since April 2009, I think this is the best option. The source code is provided on the site, and I am familiar with the component. It supports a rule provider model that will allow me to achieve the goal I am aiming for and is very easy to setup.

Create a conversation around this article

Share on Facebook
Share on Twitter
Share on Linkdin

Read more

Martin Hinshelwood
This week, I participated in a Scrum.org Webinar hosted by Sabrina Love (Scrum.org Product Owner) as well as my colleagues, Joanna Płaskonka, Ph.D. and Alex Ballarin to discuss the state of learning and how immersive learning is the future of training. You can watch the video below to hear what …
Martin Hinshelwood
For a long time now I have been searching for that perfect domain that epitomised the vision, the why, of what I am trying to achieve with my customers and the industry at large. Now I have found it in http://nkdagility.com
Martin Hinshelwood
At the MVP Summit I was appalled by the number of people who asked questions about new features for supporting hierarchical tasks! I shared a disgusted look with Peter Provost and we had a quick (and I mean really quick) conversation that resulted in this post. it really comes down …
Martin Hinshelwood
In my journey of delivering an immersive Product Development Mentor Program over the last eight weeks, a compelling narrative unfolded that beautifully illustrates the essence and true strength of Scrum. This story, rooted in the practical application of Scrum through Minecraft, unveils the depth of adaptability and resilience that Scrum …