http & http://www SEO

In: SEO

2 Jan 2010

Search engines treat http://yoursite.com and http://www.yoursite.com as two different pages. So if you have inlinks to each of these urls your Page Rank vote will be spread across these two urls. So redirecting your site to any one of the urls is a good idea from SEO perspective.

You can simply add one of these code into your .htaccess file

For redirecting from yoursite.com to www.yoursite.com:

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

For redirecting from www.yoursite.com to yoursite.com:

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

Comment Form

About this blog

Welcome to Santosh Shet's Blog! This is my blog, The Brain Dump! Im a Techy from Bengaluru! My Fav topics: Current Affairs, Web Trends, Music, Cricket. The opinions in this blog are just opinions! Not meant to hurt anyone.

Categories

Archives