There was a problem loading the comments.

Redirect using Rewrites

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Using the following .htaccess rewrite rules, you can easily redirect a domain to a new domain. 

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?
example\.com
RewriteRule ^(.*)$ https://new-example.com
/$1 [R=301,L]

  1. Edit the above so that domain, com, and new-example.com are the correct values. 
  2. Open the .htaccess file in the domain's directory via the file manager or on your computer
  3. Place the above in the .htaccess file, above any other rewrites that you may have
  4. Save the file to the server
  5. Test for any errors and using the alias domains to verify it is redirecting

Share via

Related Articles

© Cooini, LLC