Digital Colony!

Search Engine Friendly Redirects in ASP.NET

Recently I learned a tough lesson. There are two ways to handle page redirects: the brute force way and the search engine friendly way. When redesigning this site and my fitness site, I used the brute force way. I didn't know any better. Only after seeing it take weeks (Google), months (Yahoo!) or I'm still waiting (Ask) before the site was reindexed did it dawn on me that there had to be a better way. Fortunately there is a better way.

Brute Force Redirect (Server Side)

Response.Redirect("/my-new-page.aspx");

Brute Force Redirect (Client Side)

Once I realized that Yahoo! wasn't comprehending my server-side redirects, I went client-side on them. Maybe this was the trick? It wasn't.
<meta http-equiv="refresh" content="2; URL=http://digitalcolony.com"/>

Search Engine Friendly Redirect

Inside the Page Load add the following code.
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://digitalcolony.com");
Learn from my mistake and perform your search engine redirects without jeopardizing your relationship with the search engines.

Labels: ,

AddThis Social Bookmark Button

0 Comments:

 

Post a Comment

 

Digital Colony Copyright © 1999-2008 XHTML   508
This site uses Blogger, which is not 100% XHTML compliant.
Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.