Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Domain Name & DNS Issues  >  How to redirect one domain to another domain name ?
Top Scroll

How to redirect one domain to another domain name ?

 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.


For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.