This article will show you how to setup a search engine friendly permanent 301 redirect using ASP.
The most common reason for webmasters to setup a 301 redirect is when they move a site, want to merge sites, or rename a web page. For this tutorial we are going to merge 2 websites. Let's imagine that you have two sites; www.sidecompany.com and www.parentcompany.com. For this example, we want to redirect the sidecompany.com site to go to the the parentcompany.com site.
Ideally, you want to redirect each page of sidecompany.com to the most relevant page on parentcompany.com. For example, you would replace the "About Us" page on sidecompany.com with the following ASP page:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.accuserveone.com/about.asp"
>
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
</body>
</html>
*This is the entire page, you can OVERWRITE the old "About Us" page
That's it! Pretty easy, although it can be time consuming to setup for large sites. In general, it is worth the time to setup if the sidecompany.com web page was already indexed be search engines and had any sort of ranking. Setting up the 301 redirect will pass that ranking on to the relevant parentcompany.com website.