Similar to our instructions on redirecting a temporary domain to a subdomain or domain that you own, you may want to redirect one domain to another. If your DNS provides this, that is the best way to do it, as it reduces the amount of complexity on the Acquia platform, and is usually going to be easier to implement than the instructions here. That said, it is possible to do it on our platform as well.
Requirements:
.htaccess file in your code's docroot folder.In the instructions below, it assumes you have one domain (sourceexample.com) and want to redirect visitors to destinationexample.com (specifically the HTTPS version).
Below the line RewriteEngine on, add these lines:
RewriteCond %{HTTP_HOST} ^sourceexample.com$ [NC]
RewriteRule ^ https://destinationexample.com/$1 [R=301,L]You may want to add a group for the www subdomain as well.
Be sure to test out the rules first using an online tool first.