301 Redirects for ASP / Windows
The MWI website was recently redesigned, and as part of the redesign the site structure was changed such that pages that were once at a certain url are now at a different url. Rather than just leaving the old pages there or deleting them and delivering a 404 not found error, we used a 301 permanent redirect, which we coded in ASP since MWI is on a Windows server. Here's how it's done:
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.mwi.com/newpage/"
%>
This let's the search engine know that this is a permanent redirect, and it will then index the new page to replace the old page.
From the reading I've been doing you should avoid using 302 redirects when you're truly doing a permanent redirect, since 302s are for temporary redirection of pages.
Comments
I have just followed these steps and have found it to work good thus far.
Posted by: Rudy at March 29, 2007 03:48 PM
Some months ago I changed from a sub-domain to my own and I wish I had known about 301 permanent redirect. Thank you for that info.
Posted by: Angela at March 12, 2008 04:39 PM

