Hi I have a new website which has only 5 pages indexed at the moment. The homepage is indexed as http://xxxx.com and the other 4 pages are indexed as http://www.xxx.com/page.html How can I get the homepage to show up as http://www.xxx.com?
Set up a google webmaster tools account, add your domain, you will then have the option to wet it that way You can also modify your .htaccess file to redirect
I hope you got your answer. As all above answer says, i would too go with the same.Google webmaster tool is the best way to find and fix your errors.
And also you can add a .htaccess file that will set up a 301 redirect from the non-www version to the www version, aka "canonicalize" the non-preferred version. Need help with the code? Use this handy-dandy generator tool I just found Remember folks, when you rely on webmaster tools for the preferred domain you are leaving it up to chance for Bing and the other SE's (and, Yes, There are others!!)
create an htaccess and put a 301 redirect from the domain that has no www so that when search engine spider craw your website it will consider the site without the www and the site with www as one.
htaccess with: RewriteEngine on RewriteCond %{HTTP_HOST} !^www [NC] RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
You have 2 ways of doing it either from webmaster tool by google that might or might not work but best option is 301 redirections done on .htaccess file that should be in your main directory.