because as far as google is conerned, mysite.com is your main one, not www.mysite.com . It will only index one. ideally, most use the www version, with a redirect from the non www version, but its not absoultely necessary to have the www version indexed, just neater. dont fret it, but if it bother you that much, put a redirect in so all pages will be www, but expect a temporary drop in the serps for your site.
When I do these 2 commands for my website I get identical results. I don't think you are supposed to use a space between the site: and your url. Maybe if you tell us your url we can help more.
Add this in your htaccess file rewritecond %{http_host} ^mysite.com [nc] rewriterule ^(.*)$ http://www.mysite.com/$1 [r=301,nc] Code (markup):
if it was me, I would of pushed it to the www. not the http://site.com but it looks like it's working. You can also do this via google webmaster tools, and you can tell google which layout you like
edit: just looked at the site.. forget this post. PS xantoniox, sort your layout issues before you sort your redirects.
freeflyer ~ You had an very good debatable answer to this situation. Although we may have went an bit off topic discussing it.
I have seen that lifehacker has redirect from www.lifehacker.com to lifehacker.com... that is why I have done the same How ? I haven't found nothing about this homepage is a little confused... I will fix it next week So what is the best solution for me ?
Just sign in to your Google Webmaster Tools using your Google Account and click on your website name in the Dashboard and on the left hand navigation menu click on settings --> On the right hand side of the page set the required domain to show in Google. Both the above solution and .htaccess 301 redirection to the required URL
ah you mean what you saw before my edit? Yes, but i dont think it will apply in this case as its not a revenue site (which is why i changed the post), so it doesnt really matter. But yes, if this was a commercial site, theres no way i'd risk and entire site redirect at this late stage. The temporary drop is bad enough, but who knows what long term damage could be.
the best solution for you is exactly what you've done, well done. Keep your main domain as htttp://site.com, and redirect from the www version. Your site is already established, possibly with lots of external links goint to the non www version. To now change to the www address is unnecessary and will 100% definite cause drops in the serps for some time to come.