Webmaster

301 Redirects

If you decide to DELETE a web page or RENAME the webpage, the URL that Google has in its index will change. Therefore, in order to keep your SEO rankings and avoid broken links and lost customers, you should set up 301 Redirects for these scenerios. The code “301” is interpreted as “moved permanently”.

Here’s how to do that for your ASP.NET pages:
<script>
 private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>

 Here’s how to do that for your ASP pages:

<%@ Language=VBScript %>
 <%
 Response.Status="301 Moved Permanently"
 Response.AddHeader "Location","http://www.new-url.com/"
 %>


 Here’s how to do that for your HTML pages: (hosted on a Windows Server)
 

In ISS (internet services manager), right click on the file or folder you wish to redirect

  • Select the radio titled “a redirection to a URL”.
  • Enter the redirection page
  • Check “The exact url entered above” and the “A permanent redirection for this resource”
  • Click on ‘Apply’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s