ASP.Net 4.0 New Feature - 1 : SEO improvement through Redirect Permanently

Monday, June 6, 2011

ASP.Net 4.0 has added many features to its hat to cater various facilities to different user base. Permanent redirection feature helps in SEO. Before we understand more about the functionality let us look at the definitions of status codes sent to browser set by W3c.

10.3.2 301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
.
.
.
10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
.
.
.
Link

To simplify when browser receives code 301 it understands that resource has been permanently moved to reported website and 302 is considered as temporarily. So when we use permanent redirection through code behind server sends code 301 in head so each subsequent requests are auto redirected to new URL without involving round trip.

Response.RedirectPermanent("/about.aspx");

This function has one overload same as Response.Redirect to tell to end the response.

0 comments: