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

Redirect a website URL to another URL

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

For a Gen7 VPS:

  1. Make sure DNS is set up and the website is using our nameservers
  2. Log in to your Dashboard
  3. Navigate to VPS HOSTING
  4. Select your VPS: yourvpsname.com 
    -> Click Manage (green button)
  5. Go to the Web Sites
  6. Click Add New Website or Subdomain to this VPS (green button)
     or if this is already complete, move on to the next step.
  7. 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/");
    ?>

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