301 redirects are as easy as a click of a button and very helpful when you want to protect your domain names.
Usually companies purchase multiple domain names to prevent their competitors from taking their .net or .org name. For example, if you already own www.yourwebsite.com, it is a good idea to also register www.yourwebsite.net and even www.yourwebsite.org. Some people even go so far as to register the misspellings of their domain name just to be sure that their competitors don’t grab it.
The problem is you don’t want to develop different sites on those domains and it is frowned upon by Google to have multiple web sites with identical content. So what do you do in such a scenario?
You can place a 301 redirect on your web site. This tells search engines where to find your preferred web site.
This helps because if someone types in say, www.YuorWebsite.com instead of www.YourWebsite.com which is the proper way to enter your web site address, the person who typed in www.YuorWebsite.com where the “o” and the “u” are inversed will automatically be redirected to the correct web site.
Using a 301 redirect doesn’t harm the site in the search engines and prevents you from having to develop multiple web sites with the same content which the search engines hate anyhow.
So now that you understand why you should use a 301 redirect, how do you go about putting one on your website?
Here are some simple ways to put a 301 redirect on your web site:
First and foremost, some people may recommend that you use a JavaScript meta refresh technique on your web site. This is not recommended because it is a technique used by spammers and you certainly wouldn’t want to follow in the footsteps of spammers.
If you are using a Linux server follow these steps:
* Go to the web site that you want to redirect from. For example, if you want to redirect www.websitenumber1.com to www.websitenumber2.com then put the following information in the root directory of the www.websitenumber1.com.
* Create an .htaccess file using the following code:
redirect 301 /the-directory-on-websitenumber1/the-page-on-websitenumber1.htm http://www.websitenumber2.com/
* Save the file as simply .htaccess
* Be sure you save the file in the root directory of your web site.
* Upload the file to your web server
* Test the file by going to your old web site address and be sure it redirects to your new web site
Please note however that the update will take about 24 hours to work.
If you are using a Windows server with. ASP pages then use the following code:
< % Response.Status=”301 Moved Permanently” Response.AddHeader “Location”, ” http://www.websitenumber2.com”>
If you are using a Windows server with ASP.net then use this code:
private void Page_Load(object sender, System.EventArgs e) { response.status = “301 moved permanently”; Response.AddHeader(“Location”,”http://www.websitenumber2.com”); } < /script>
Be sure that if using a Windows server with either .asp or ASP.net pages that you put the code before the tags on your page.
A 301 redirect will safely tell the search engines that your site websitenumber1.com and websitenumber2.com are the same as websitenumber1.com without wasting the search engines time and you can be sure that if someone accidentally enters in the wrong domain name, they will still end up at the correct website.
If you need a more powerful web hosting solution to cope with increasing demand, visit our homepage.