301 Permanent Redirect using ASP


By StrangeWork.com: I’ve been using my search engine optimization skills on a few different sites recently. The Democrats for Monmouth County website is my current challenge. One of the main challenges I faced was converting the old ugly links over to the new SEO friendly links without losing placement in the search results.

Link conversion example
Old URL:
http://mcds2007.com/Default.asp?P=393

New URL:
http://mcds2007.com/contact

To keep your existing search engine rank, use a Permanent 301 Redirect to force the spiders to the new link. Simply add the below code to the top of your ASP script:

Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “/contact”

Easy as that! Google, Yahoo, and the rest of the search engines will update your site links in their index without penalizing the new link.

Related posts:

  1. How To: Create Custom ASP URLs with Querystrings using ISAPI Rewrite
  2. Sitemaps
  3. How To Increase Blog Traffic part 1: Google Webmaster Tools
  4. How To: Update your Twitter status with ASP
  5. How to: 301 Redirect from one domain to another using mod_rewrite
Enjoy this post? Be sure to subscribe to my RSS feed and my WordPress Tips and Tricks Newsletter! Also check out my new book: Professional WordPress

Comments

  1. Richard says:

    Does this mean you will keep the old file on the server as well as the new file? Is there going to be a problem with duplicate content? Just wondering…

    We are re-structuring our clients sites and was wondering which path to go. We were thinking of a ISAPI_Rewrite. Any experience with this?

  2. Brad says:

    It’s the same file, I’m actually just using ISAPI REWRITE to create the friendly URL. You can view my post about how to create ISAPI REWRITE friendly URLs here:

    http://www.strangework.com/2007/08/09/custom-asp-urls-with-querystrings-using-isapi-rewrite/

  3. Richard says:

    Thanks for the info!

Speak Your Mind

*