Knowledge Base
MilesWeb / Domain Name & DNS Issues

How to redirect one domain to another domain name ?

Approx. read time : 2 min

As the name suggests it simply redirects the website to other domain as required.

1. Domain name redirects on DNS level by using CNAME records. CNAME stands for Canonical Name & it specifies that the domain name is an alias of another, canonical domain name.

2. PHP & HTML redirects – Instead of .htaccess file you can use PHP or an HTML file to perform actual redirection. Using these re-directions, you can set delay before the URL’s are being redirected.

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

header( ‘Location:’ ) ;

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


In HTML, you get the option to delay the redirect by increasing the value of CONTENT variable. If you set CONTENT=3, it will delay the redirect for 3 seconds.

3. You can also use .htaccess files under the DocumentRoot for the website and set the redirects.

Login to your cPanel, access option Redirects. You can then set the redirects as required.

If you are not able to set redirects or if you are facing any issues and your current hosting provider is not helping you, please feel free to sign up for our cPanel hosting package. MilesWeb’s experienced team of professionals will resolve all the issues and also help you to migrate the website from your current host to MilesWeb servers.


With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.