Google and other search engines will often index your site two different ways: one with the www and another time with the non-WWW information.
If you haven`t set your preferred domain in Magento (as well as in Google Webmaster tools), you may be penalized for duplicate content. Or, inbound links from the non-www (more common with people linking from social media sites) may not be giving your main domain any real link juice, or inbound link results.
Another issue: if you have inbound links from Google CPC campaigns to the www domain, and your site`s navigation then changes to the non-www domain, you will often lose the tracking for Google`s conversion to purchase and Google Analytics.
In Magento, you can set this preference in the admin area under “Unsecure” and “Secure” Base URL, but you also should add a rewrite rule in your .htaccess file to handle the redirect / rewrite:
RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ www.yourdomain.com/ [R=301,L]
|