How to Setup a Domain Redirect in cPanel
At times you may want to redirect traffic from one domain to another domain. This can be done at the domain level or for specific web pages. For example, domain.com and it's web traffic can be redirected to anotherdomain.com OR domain.com/aboutus.html can be redirected to anotherdomain.com/about.html. In this guide we will show you how to create a redirect in your cPanel. This automatically adds a redirect rule to your .htaccess file for you.
Redirecting a Domain
- Login to cPanel.
- Click the Redirects button in the Domains section.
- You will then be on the Add Redirect page. Click the drop-down box for Type and choose if you want to create a Permanent (301), or Temporary (302) redirect.
- Click the next drop-down box and choose the domain you want to redirect.
- For the slash '/' field enter any folder names if necessary.
- Enter the address you want to redirect to in the Redirects to section.
- Choose if you want to "Only redirect with www." "Redirect with or without www." or "Do Not Redirect www."
- Check the box if you want to create a Wild Card Redirect. This will add the the file/folder name after the url when it redirect. For instance, example.com/test.php would redirect to example2.com/test.php.
- Click the Add button when you are finished.
Congratulations, now you know how to create a redirect in your cPanel! You can also create a 301 redirect directly in your .htaccess file.