301 Redirect in IIS
By Mike Irving - Published: 31/8/2007

When completely remaking a website, it is often neccesary to Redirect all requests for old pages to appropriate new pages.

This is for the benefit of both the user, and Search Engines.

A "301" status code should be passed to the browser / search engine when such a redirect is made. In short, a code "301" redirect represents that the page has "Moved Permanently". For search engines this tells them to stop spidering the old page, and look to the new URL.

There is a popular myth amongst the Search Engine Optimisation (SEO) community that this is difficult / impossible to acheive in IIS

This couldnt be further from the truth. 301 redirects can be done programmatically in both ASP and ASP.Net. The best way to redirect old pages on mass is to setup a custom 404 handling page in IIS, written in either ASP or .Net, that redirects pages, with "301" status. Any old pages that come in will be redirected to appropriate new ones, or the home page if you prefer. You can also put routines in here to return status 410 "Gone" should you wish to, and finally if no pages match those you are trying to catch, then return your custom 404 page.

To redirect a whole site, irrespective of filename, you can simply set make a change in IIS that will take you just a few seconds.

Plase do contact me if you want to know more.


View Blog Entries...
Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11