in case you dont use CNAME records, htaccess can redirect too:
In your FTP root (maybe in public_html) should be a file called .htaccess, then open it and add this code into it (problably after the first line, bofore other rules start) .
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
( if there is not such file, then create a simple new text file with notepad and upload to the website root directory, and rename it to .htaccess )
This is 301 (which is permanent redirect), and then after a few weeks the site will be visible with www in Google search engines anymore.
domain.comtowww.domain.com. Anyway, the .htaccess method is usually fine – Pekka 웃 Oct 31 '11 at 14:42