Using 301 URL Tracker when migrating from classic ASP websites to Umbraco (Updated!)

When we migrate our customers old websites from Classic ASP to Umbraco we often get the problem with missing URLs, and sometimes the SEO ranking drops badly.

The best way to handle this is to use the excellent Umbraco package 301 URL Tracker from InfoCaster.

The purpose of the 301 URL Tracker package, is to create some SEO friendlyness. Search engines crawl your website and store links to all pages within your website.

But this is when you have a functionally Umbraco-setup. And to get http://mywebsite.com/about.asp to automatically redirect with 301-response to http://mywebsite.com/about-us/ you have to do some tweaks.

This is how we do it:

  1. Install the 301 URL Tracker package.
  2. Install URL Rewrite Module from Microsoft.
  3. Add new IIS URL-rewrite rule to redirect from about.asp to about.aspx (Only to get Umbraco to pick it up since it does not handle classic ASP.)
  4. Set up a 301-rule in the package, use RegEx or map page by page.
  5. Youre done!

Step 1, Download an install the 301 URL Tracker package

Use either the repository or downlad it here.


Step 2, Install URL Rewrite Module

Install the URL Rewrite Module in your IIS (you can install it from Web Plattform Installer).


Step 3, Add this to the URL-rewrite rules in your IIS

urlrewrite-iis-ny.PNG

This is inbound rewrite rule in IIS is to convert the *.asp extension to a *.aspx. Only to get Umbraco to handle it. The /redirects/ destination is virtual, so that we can use it later.


Step 4, Set up rules for the 301-responses in the package

Log on to Umbraco backend, and go to the 'Settings' section. Right-click on 301 URL Tracker in the menu on the left and 'Create'. Choose the node that you wish to redirect to.

301urltracker4.PNG

Ok, here comes the tricky part, you can either choose to use a RegEx rule to redirect everything to the root node. Or you can map page by page for best SEO effect. If our case, we map page by page like this:

301urltracker5.PNG

We have now set up a rule that redirects the old http://mywebsite.com/about.asp to http://mywebsite.com/redirects/about.aspx and then again redirected with the 301-status back to the new existing node http://mywebsite.com/about-us/.

Does it make sense?


Notes: There are probably a hundred ways to do this better, but this solution works fine for our customers. If you have any ideas on how to improve it, please get in touch! I also gues that you could use this for PHP-pages as well.

Updates: This Blog-post was updated 2011-09-26 when @kipusoep enlightened me that you should use IIS Rewrite Module instead of Urlrewriting.Net. Thanks Stefan!

Posted by Kalle Ekstrand at 09:47

7 Comments:

Stefan Kip said...
Kalle, thanks for writing this great blogpost about my 301 URL Tracker. Many people have had problems with this, so now I can refer them to this blog post :-)
September 27, 2011 22:09
Niels Henriksen said...
Nice post.... i will remember that for some of my asp.old customers.
September 27, 2011 22:09
Kalle Ekstrand said...
Thanks Stefan, please let me know if you find anything in my post that does not make sense...
September 27, 2011 22:09
Petr Snobelt said...
Nice post, but why you rewrite to about.aspx and not to about/ in step 2?
September 27, 2011 22:09
Kalle Ekstrand said...
@Peter: because then you dont get the 301-status (Moved Permanently) of the redirect.
September 27, 2011 22:09
Rik said...
You need a "FB like / retweet" button next to your blog title ;)
September 27, 2011 22:09
Peter Josefson said...
@Petr: Only to expand on Kalles answer a bit - the only purpose of the IIS rewrite rule is to make Umbraco (and the 301 URL Tracker) get the request from IIS at all (they only get aspx and other ASP.NET requests). The actual stuff you want done then (tracking the request and redirecting to a new content location), is handled by the tracker. An alternative is to manually map .asp to the aspnet handler - but I think Kalles approach is cleaner and more intuitive.
October 11, 2011 19:10

Post a comment