301 Redirect - How to create 301 Redirects

Before I start explaining about 301 redirect, I know you are wondering what is the 301 redirect and How to create 301 Redirects , You must have heard the term 301 redirects. All I can say is 301 redirects are extremely helpful when you want to keep safe & protect your domain names.

Normally Brands & companies Buy several domain names to protect their Brand name from buying their .net , .co.in or .in domain name. For example, if you registered domain name - www.Yourdomain.com, it is considered best to also register other TLds too like www.mydomain.net and even www.mydomain.co.in. Some people even register the similar keywords of their domain name or keywords as domain to kill the competition.

The main problem with this type of practice is you do not want to have several different websites and there is a chance that search engine google can consider it as a duplicate content and plagiarism for identical content. So whats the solution ? Then You have to place a 301 redirect on your website to tell the search engines where to find your main or preferred website. Every one must use 301 at the time of web development

301 redirect helps you because if customer or any user types in say, www.mydomain.com instead of www.mydomain.com which is the proper way to enter your web site address, the person who typed in www.mydomain.com where the "r" and the "r" are inversed will automatically be redirected to the correct web site.

301 redirect prevents you from developing several web sites with the identical content which the search engines consider as duplicate content.

If you use a web host like GoDaddy.com , then you can redirect your domain names by a Just click of a button.

If you want to do it mannualy, then here are a few examples to put a 301 redirect on your website:

1. JavaScript meta refresh Practice ( not recommended )

If you are using a Linux server then follow these steps:

 If you want to redirect www.mydomain.com to www.mydomain.in then place the following information in the root directory of the www.yourdomain.com.

- Create .htaccess file using the following code:

redirect 301 /the-directory-on-mydomain/the-page-on-mydomain.html http://www.mydomain.in/

- Save the file as simply .htaccess

- Check the file in the root directory of your web site.

- Upload the file to your server

- Test the .htaccess file by going to your old web address and make sure it redirects to your new website

Please note down that the update will take about 24 hours to work.

If you are using a Windows server web hosting with .ASP pages then place the following code:

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

If you are using a Windows server with ASP.net then place this code:

private void Page_Load(object sender, System.EventArgs e) { response.status = "301 moved permanently"; Response.AddHeader("Location","http://www.mydomain.in"); } < /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.

301 redirect tells the search engines that site mydomain.com and mydomain.in are the same as yourdomain.com without wasting the Search Engine's and you can be sure that if accidentally visitors enters the wrong domain name, they will still end up at main website yourdomain.com.

No comments:

Post a Comment