RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
- Edit the above so that domain, com, and domain.com are the correct values.
- Open the .htaccess file in the domain's directory via the file manager or on your computer
- Place the above in the .htaccess file, above any other rewrites that you may have
- Save the file to the server
- Test for any errors and using the alias domains to verify it is redirecting