Hosting: Howto redirect domain to another domain.

There is always a question on how to completely redirect some src-domain to another dst-domain properly.
And while there is the simple straightforward way to do so, there are always some dedicated server customers of the web hosting that are trying to reinvent the wheel one more time. And failing miserably.

Here is simple step-by-step instruction on how to redirect src-domain to ds-domain on dedicated web hosting (There are specific instructions for WHM/cPanel and other control panels users that could be found elsewhere).

  1. Register src-domain, and configure its virtual host just like any other regular virtual host on your dedicated server
  2. In the DNS zone create a record
  3. In your virtual host public_html directory create index.php file with the following contents

This is it – you are done. Enjoy.

Share Button

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">