Response.RedirectPermanent() – SEO Feature of ASP.Net 4.0

Response.Redirect() v/s Response.RedirectPermanent()

We have used Response.Redirect() and Server.Transfer() in earlier versions of Now we have Response.RedirectPermanent() method in ASP.Net 4.0 to permanent redirection of a page with http status code 301. This is basically useful when the website is available on internet and webpage or whole website is moved from one domain to another or URL is changed. Http code 301 will be issued and search engine will automatically take care of new URL. HTTP 301 redirect will instruct search engine that the page have been moved permanently and old url can be removed from Index. This is really very useful for search engine Like google.

The difference between Response.Redirect() and Response.RedirectPermanent as follows

1. Response.Redirect() is considered as a temporary redirection by search engine whereas Response.RedirectPermanent() is considered as a permanent redirection of a page which means it informs search engine that the page location has been moved permanently and needs to be indexed for future reference.
2. Response.Redirect() redirects page with Http code 302, Response.RedirectPernament() redirects page with http code 301.
3. There is no search engine optimization benefit in Response.Redirect() because of its temporary behaviour.

Here is the code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MSCoderPermanentRedirectSample
public partial class ProductsForm : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)

If we have Fiddler2 then we can see HTTP headers and HTTP 301 code clearly.

When to use:

Response.Redirect – If page is temporarily changed and will be changed to original form soon.
Response.RedirectParmanent – When we want to delete old URL index from search engine and store new URL for better performance.
Server.Transfer – If we want search engine to be unaware of the redirection.



Related Articles

ASP.NET 4 Brings Clean Web.config Files

Major configuration elements have been moved to the machine.config file in .NET 4 With the advent of the latest iteration of Microsoft's development platform and tools, the company took a number of steps designed to result in optimized desktop and Cloud applications for devs, simply by leveraging Visual Studio 2010 and .NET Framework 4. An illustrative example in this regard is the new Web.config file that can accompany ASP.NET 4.

More articles: ASP.NET 4.0 SEO feature ASP.NET 4.0 features ASP.Net 4.0 SEO optimization


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: