How do I redirect a website I own to another URL?

Lets say you own "mydomain.com" and want visitors who go here to land on "theirdomain.com".

Here are the steps we suggest to accomplish this on our Gen7 VPS;

  1. Make sure DNS is set up and the website is using our nameservers
  2. From within the dashboard under the "Websites" tab, add a new website to the SmartVPS or if this is already complete, move on to the next step.
  3. Then in the public directory of that website (/home/domains/mydomain.com/public) add these lines of code in place of the contents within index.php:
    <?php 
    header("Location: https://theirdomain.com/");
    
    ?>
  4. All done, this allows us to safely redirect the traffic from one site to the other.

Note: You can do this on Gen6 VPS's as well, you just need to modify the directory to path to look like this;

/home/domains/mydomain.com/docs

 

Tags: domain, redirect

You cannot comment on this entry