At times you may want to 301 domain redirect traffic from one domain to another and this can be done at both the domain level and for specific web pages. For example, domain.com and its 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 show you how to create a redirect in your cPanel which automatically adds a redirect rule to your .htaccess file.
(Not a current customer and want to spend less time working in cPanel? Click here to learn more about Dedicated Server Hosting and the benefits of having 1-on-1 Sysadmin time included in your plan.)
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 either 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 redirects. For instance, example.com/test.php would redirect to example2.com/test.php.
- Click Add when finished.
Congratulations, now you know how to create a redirect in your cPanel! Did you know? You can also create a 301 redirect directly in your .htaccess file.