If you are on an Apache server, you can past the following into an .htaccess file, and it will always redirect the non-www domain to www.domain
Tom
Options +FollowSymLinks
rewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=permanent,L]