Tuesday, March 8, 2011

In ASP.NET URL rewriting, should use 301 Moved Permanently redirect instead of 302 for SEO

For 301, Search engines will accept this and page ranking is divided between old and new version of the page.

Permanent (301) redirection in ASP.NET
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "/New-Page/");

Permanent redirection in ASP.NET 4.0
Response.RedirectPermanent("New-URL.aspx", true);

No comments:

Post a Comment