Redirect one domain to another domain

You can set up a URL redirect to forward your domain (e.g., www.yourdomain.com) to any destination page of your choice. There are many methods to redirect if you using cpanel and plesk panel so there is option like redirect and forwarding. But without using this feature we can do it by HTML and PHP page.

 

For PHP, create a file (index.php for example) and add the following lines in it:

<?php
header( 'Location: http://www.yourdomain.com/' ) ;
?>

For HTML, create a file (index.html for example) with the following content:

<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://www.yourdomain.com/redirect_location">

Here you have the option to delay the redirect by increasing the CONTENT variable. For example CONTENT=10 will delay the redirect for 10 seconds.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *