Example: how to create a redirect

If you have 2 domains (not necessarily on the same site) domain1.tld and domain2.tld, and you need that when accessing domain2.tld, the address of the users changes to the "correct" one, and redirection immediately occurs, then add for the domain domain2.tld redirection to http://domain1.tld/

if you need to be automatically redirected to when accessing your domain domain.tld www.domain.tld , create a file on the virtual site in the /home/uXXXX/domain.tld/www directory.htaccess (note that the file name starts with a dot) as follows:

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

where uXXXX is the name of your virtual site, domain.tld is the name of your domain.