Don’t let your pagerank drop


I have observed many sites are either accessible using http://www.abc.com or http://abc.com This may sounds ok but Google does not take it well. Google considers both as two separate websites. Apart from problem of duplication, it may also cause problems of different pageranks for both versions.

There is a simple way to solve this problem by editing your .htaccess file.

  • Redirect visitors from nonwww to www version – Well this is the most used system where people redirect anybody visiting http://abc.com to http://www.abc.com Sounds good. To achieve this put the following code in your htaccess file:

    Options +FollowSymLinks
    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^example.(.*)
    RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

  • Redirect www to nonwww version – Well this is what I use here. Even if you type https://www.nspeaks.com it redirects to https://nspeaks.com To activate this use following code in your .htaccess file:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.nspeaks\.com$ [NC]
    RewriteRule ^(.*)$ https://nspeaks.com/$1 [R=301,L]

Use any one of the rules and this will ensure that both versions of your site will get same pagerank.

1 Comment


  1. Great tip for those with sites that are accessible with or without a www in front. Not very complicated but definitely worth the work considering your site may rank higher.

Comments are closed.