www vs non-www (301 redirect)

Posted by saurabh On August - 2 - 2009
        ('DiggThis)           SocialTwist Tell-a-Friend     
VN:F [1.9.1_1087]
Rating: +2 (from 2 votes)

Some search engines treat www and non-www domains differently.  For example techwhiz.in and www.techwhiz.in may be treated as two different domain names by some search engines. The biggest disadvantage of this is your site’s SEO. The google pagerank, traffic data, inbound and outbound links will be different for techwhiz.in and www.techwhiz.in. In short your website’s potential is getting undermined. Search engines may even penalize your domain for duplicate entry and you may loose a lot of traffic. So, you must set 301 redirection to redirect all non-www traffic to www.

What is a .htaccess file?

When a visitor/spider requests a web page via any means, your web server checks for a .htaccess file. The .htaccess file contains specific instructions for certain requests, including security, redirection issues and how to handle certain errors. You can find this file in your website’s root directory.

What is a 301 redirect?

The code "301" is interpreted as "moved permanently".

Implement 301 redirect (for websites running on apache servers)

  • Download the .htaccess file to your local directory
  • Open the file in notepad
  • Add the following text and save the file
    Options +FollowSymLinks 
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} ^yoursite.com [NC] 
    RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
  • Upload the .htaccess file to the root directory of your website
VN:F [1.9.1_1087]
Rating: +2 (from 2 votes)
-->
107 views ;  TAGS: , , , ,
Related Posts:
  • Remove Google Redirect Virus
  • Akshay
    Thanks for the info...
blog comments powered by Disqus

We cannot change our Rulers, but we can change the way they Rule Us. — Dhirubhai Ambani