Apparently google doesn’t like it sometimes when your site can be accessed under:

mysite.com & www.mysite.com

To remedy this go to your .htaccess file to force www on your website. This should be in the root of your website. It will do a 301 Permanent redirect, which will force search engines to use the www version.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^maindomain.com
RewriteRule ^(.*)$ http://www.maindomain.com/$1 [R=301]

Another option if this doesn’t work.

# Forcing www. infront of domain
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

This only works on website hosted with Linux. Let me know if there are other ways of doing this and I’ll update this post.

[Source]