Published on: 02 Aug, 2013

301 Redirect Page in ASP.Net C#

Tumblr Digg Google Plus

When you build a new website, you want to make sure that you perform 301 redirect page for each individual link or page. Otherwise your old site links and information are no longer available in Google search and this can be bad for your site ranking.

This quick code snippet will show you how you can perform 301 Redirect Page in ASP.Net C#. Note: you may want to alter the redirect url and include some cases to suit your requirement.

private void Page_Load (object sender, System.EventArgs e){   
   string redirectURL = "";
   Response.Status = "301 Moved Permanently";  
   Response.AddHeader("Location", redirectURL);


There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.