You may want to redirect all visitors to coming to your domain “domain.com” to “www.domain.com”. Most popular way to do this is using apache’s mod_rewrite module. You just need to add few lines in your apache’s configuration file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com$1 [R=permanent,L]