301 Redirect
This article will cover several different ways to accomplish a 301 Redirect.
If you have to change file names or move pages around, your URL will change for that page. Using 301 Permanent Redirects will redirect search hits to the correct page without losing your spot in the search results list. The code "301" is interpreted as "moved permanently".
There are several different methods to accomplish a 301 Redirect.
IIS Redirect
Open Internet Services Manager by going to Start -> Administrative Tools -> IIS

If you do not have "Administrative Tools" as part of your start menu, you can also open IIS Manager via the Run command. Click on Start -> Run, and type "inetmgr" to open IIS Manager.

In IIS Manager, Expand the Server Name and Web Sites folder. Find the site you wish to edit, Right Click on the site and choose Properties. You can also select to redirect individual files instead of the whole site URL. In this case, you would expand the site to view its files, and Right Click on the file to redirect and choose Properties.

In the Properties window, Click on the "Home Directory" tab. Once there, click the "A redirection to a URL" option. This will enable a text-box for you to type the New URL this page/site will redirect to. Enter the full URL to the new location. Check the "The exact URL entered above" box as well as the "A permanent redirection for this resource" box.

Click "Apply" and "OK" to save these changes. This page will now redirect to the entered URL when accessed.
Alternatively, you can set up redirects directly through the pages coding. This is helpful when you do not have access to make system changes, or if you need to change these frequently.
ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.your-new-url.com/"
%>
ASP.NET Redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.your-new-url.com/");
}
</script>
JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.your-new-url.com/" );
response.setHeader( "Connection", "close" );
%>
PHP Redirect
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.your-new-url.com/" );
?>
ColdFusion Redirect
<.cfheader statuscode="301" statustext="Moved Permanently">
<.cfheader name="Location" value="http://www.your-new-url.com/">
HTML Redirect
<HEAD>
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>