no www pointing to www?

scraf

Verified User
Joined
May 17, 2006
Messages
7
I have always been happy that someone can access my sites by typing site.com

It has been pointed out to me, however, that for search engine optimization it is better to have all requests for site.com to be redirected to www.site.com.

Can someone please tell me how to configure the server to achieve this using DirectAdmin ( if that is indeed possible )?

Comments also very welcome.
 
Managed to find a way to achieve what I wanted using....

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mySite.com [NC]
RewriteRule ^(.*)$ http://www.mySite.com/$1 [L,R=301]
..... in a .htaccess file in the root.

If there is a better way I am all ears.
 
Back
Top