301 Redirects for ASP / Windows

17 Oct 2006 at 12:09 by Joshua J. Steimle

The MWI website was recently redesigned, and as part of the redesign the site structure was changed such that pages that were once at a certain url are now at a different url. Rather than just leaving the old pages there or deleting them and delivering a 404 not found error, we used a 301 permanent redirect, which we coded in ASP since MWI is on a Windows server. Here's how it's done:

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.mwi.com/newpage/"
%>

This let's the search engine know that this is a permanent redirect, and it will then index the new page to replace the old page.

From the reading I've been doing you should avoid using 302 redirects when you're truly doing a permanent redirect, since 302s are for temporary redirection of pages.

digg digg it!  delicious, mmm Add to del.icio.us

Comments

I have just followed these steps and have found it to work good thus far.

Posted by: Rudy at March 29, 2007 03:48 PM

Some months ago I changed from a sub-domain to my own and I wish I had known about 301 permanent redirect. Thank you for that info.

Posted by: Angela at March 12, 2008 04:39 PM

Post a comment




(you may use HTML tags for style)

Recent SEO Articles

Why Google Shouldn't Discriminate Against Paid Links

21 Apr 2008 at 14:58 by Joshua J. Steimle

Because it can't accurately identify them. Frankly, I don't have much against Google having something against paid links. It's their search engine, they can do whatever they want with it. Of course I'd prefer they live and let live when it comes to paid links, for my own self-interest as someone who occasionally uses paid links as a way to build incoming links for my SEO clients.

But the problem is there's no way for Google--I should say "no effective way"--to differentiate between a paid link and one that isn't paid for.

The SEO Con Artists

17 Apr 2008 at 09:31 by Joshua J. Steimle

A real description of an SEO firm on an SEO directory:

Full service 1-on-1 SEO marketing since 1996. Check out comprised month-to-month packages at SEOgame.com (Eg. $375 package will start out at 2,220 manual directories and 550 manual article directory submissions) Manual submission services will provide permanent 1-way links and include 3 project managers and 17 site submitters to get the job done right with lots of worrrrrrrrrrrrrrrrrk! Get to the top of the in less than a month for your top keywords today.

If you're shopping for SEO services and you hear this type of pitch, you might figure "Hey, it's only $375 and maybe I'll get something out of it even though it sounds too good to be true." But what you should be thinking is "For $375 I could take my wife out for a really, really nice night on the town, and the ROI would be higher to boot."

Fixing Other SEO Firms' Mistakes Using Dreamweaver Wildcard Search and Replace

20 Feb 2008 at 18:31 by Joshua J. Steimle

All too often we take over search engine optimization efforts for a new client, only to find that the last SEO firm or SEO professional they were using did so many things wrong it's going to be a major effort just to clean up their mess, let alone start making progress (although I suppose cleaning up is a form of progress, but you know what I mean).

Case in point, we just took over doing SEO for a billion-dollar enterprise with a substantial website, and what do you know, the last SEO people working on it stuffed the site full of stuffed image alt tags, stuffed keyword meta tags, stuffed url title tags, etc. And they were very thorough with their work in that they didn't repeat the content of the various tags, they mixed it up in every case so they aren't the same and therefore you can't do a simple search and replace to find them all. The slow way to get things done would be to edit every page by hand, deleting the offending code, but thankfully Dreamweaver lets you do a wildcard search and replace that is a lifesaver.

Organic SEO Articles >>