2
hello kizun4,
if your server support RewriteEngine set
http://www.domain.com in the mainfile. create a .htaccess and write in:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
In this case it will always switch to
http://www.domain.com, no matter if you type with or without www.
it is also good for preventing duplicate content.