How-To
The Rundown on 301 and 302 Redirects
When to redirect, and why by Serge Thibodeau
Dec 21, 2004
The critical subject of redirecting a domain name to another has always generated a lot of controversy and has been the center of debate for many webmasters for almost as long as the Internet has existed.
The need for having a site redirected to another URL can be based on many factors. One valid reason for doing this could be if you have a website and if your company name happens to be the domain name for your site. In order to make your site more “keyword-rich” in the search engines, you might want to seriously consider changing your domain name to another one.
With the price of domain names falling almost constantly, the cost factor isn’t as much an issue as it was a few years ago. If your company sells flowers online, you make a search for “onlineflowers.com” and you might notice the domain name is available. You can register that domain name, and have it “point” to your other URL, effectively making both domain names functional.
The next step in this process is to find a “safe” method to redirect your newly found domain name to your old web address (your existing domain name). The “safe” way to do this is by using what is called in the industry a “301 Redirect.”
Some site owners and webmasters are seeing their websites getting penalized or banned in Google or other search engines for some reason or another. Previously, www.business.com, an online resource that has been very popular for many years and that has over 600,000 web pages in its root index was banned and penalized in Google, simply because it was using the wrong kind of redirect method. Getting a site banned in a search engine because of the wrong class of redirect happens more often than some people think.
Earlier in the year, www.business.com now had a PR of 0 on their home page, down from a PR of 8 (a huge drop in its overall Page Rank value) and disappeared from Google's index. After carefully checking the sites’ server headers, I discovered they're delivering an 'HTTP/1.1·302·Object·Moved' redirect from business.com to www.business.com.
In essence, there's nothing wrong with this technique. However, lately, some search engines have begun to penalize and ban certain websites because they're doing the wrong type of redirect from the new domain name to the main website's URL.
The wrong kind of redirect command can cause complex problems
Some web hosting companies allow you to add domain names and then perform some redirects that are programmed to “switch” one domain name to another using what is called a "302 Temporarily Moved" redirect. A 302 redirect is the wrong type of redirect to use. If you need to permanently redirect a domain name to another, the only command that is accepted and sanctioned by all search engines is a “301 Permanently Moved” command.
The first step is to analyze what the search engines see when they visit your site. When a user or a search engine crawler or spider request a web page from your site, the web server responds with what is called “server headers” even before any actual web page is sent to the browser. This includes what type of server it is, a date and time stamp and usually a '200 OK' message, meaning that the process was successful. If all went well, the requested page is delivered by the web server and will be processed by the user’s browser.
However, when a redirect is in effect, then your server will respond with either a '301 Moved Permanently' or, as is often the case, a '302 Moved Temporarily' type of message, which is not the kind of message you need if you wish to be on the safe side with the engines.
Search engine crawlers are getting more and more sensitive, and they often make critical decisions based on what your server tells them through the server's headers. These decisions can make or break your search rankings. In the case of business.com, the wrong kind of decision was taken, since it was using a ‘302 Redirect’. Had it used a 301, this whole thing could have been completely avoided.
If you want to prevent such a mishap from happening to your site, simply perform a 'server header check' and view the data that your server will transmit to you. One simple way to verify this is to simply view your server log files. Most good web hosting companies will supply to its customers its server log files, where you can view such critical header files.
Correctly resetting the proper 301 redirect command
There are two correct ways to properly set up a 301 Permanent Redirect. If you’re using a Linux or Unix type of server, you can use the features of the .htaccess file to add the redirect to your server’s root command. That is the most complex way of doing it, and I strongly suggest that you either read on the correct way of performing this, or that you hire an experienced network administrator that will do it for you. If done incorrectly, an improperly configured htaccess file can either cause your site to fail completely, rendering it unreachable to anybody, or can cause other problems of similar nature.
The easier and fastest way is to do it in the DNS (Domain Name Server) zone of the domain name. Some web hosting companies have the proper infrastructure and the right software to perform a 301 Permanent Redirect using this method, and it is suggested you contact one of them. If you need a few good names, I can refer you to some of them that have performed this service for me for many years and that I am happy with the results, both from a site functionality basis, as well as from a search engine’s perspective.
On the other hand, if your site is hosted on a Windows or IIS type of server, then this critical “301 redirect” command can be done in the Administrator's section of the server software or through the DNS zone as suggested above. Again, I suggest you contact an experienced Windows web hosting company that will safely carry out this service for you.
Conclusion
Correctly setting up a “301 redirect” command can be a very fast and easy step for any web master or site owner if done correctly and if you know how to do it right. Don’t take chances of having your site banned like Business.com was earlier this year. A “302 redirect” command is an invitation for getting your site banned, since search engines don’t like temporary redirects.
If in doubt or if you’re uncertain that your hosting company can do this right for you, I can recommend you some good names that have the necessary experience in this field and that will gladly provide this service for you.
Reference: Web Pro News.
