If you have 2 domains hosted (not necessarily on the same site) domain1.tld и domain2.tld, and you need to ensure that when contacting domain2.tld the users changed their address to the “correct” one and were immediately redirected, then add the domain for а domain2.tld forwarding to http://domain1.tld/

If you need that when accessing your domain domain.tld there was an automatic redirection to www.domain.tld, create on a virtual platform in the directory /home/uXXXX/domain.tld/www The .htaccess file (note that the file name begins with a dot) contains the following:

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

 domain.tld — your domain name.

Was this answer helpful? 56 Users Found This Useful (203 Votes)