RSS

SEO Friendly URL redirects

13 Jun

You might have website that redirects to home page when user enters.

http://www.Mysite.com
http://www.Mysite.com/home.aspx
http://www.Mysite.com/index.html

Since they all point to same home page many ordinary users and even some developers think these URLs are same.But they have subtle differences from the SEO perspective. This kind of non-canonical URLs can lessen search engine rankings.

From ASP.NET perspective this can be best done with new ASP.NET 4.0 syntax,

Response.RedirectPermanent; 

rather than Response.Redirect method. Reason for this is Response.Redirect works by returning a 302 HTTP status code and a Location HTTP header to the client. Header indicates the URL to which the requested page has been redirected. The 302 status code indicates that the resource being requested has temporarily moved to a new URL like some webmasters do when doing site maintainance tasks. A search engine spider who also acts as client browser that receives a 302 status still use the multiple forms of URLs and index the multiple URL forms.
Solution to this is instead of returning 302 to the browser when doing redirection return status code 301 while doing redirects this has been facilitated in ASP.NET 4 new   Response.RedirectPermanent;method.
Since the status code 301 returned to the client browser but also to search spider it correctly index the pages with canonical home page URL you have decided instead of the multiple URL forms. Which enhances your search engine rankings.

Advertisements
 
Leave a comment

Posted by on June 13, 2011 in ASP.NET

 

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

 
%d bloggers like this: