You can easily set up a domain redirect on cPanel using the built-in Redirects system. To create a new domain redirect, simply follow these steps:
- Log in to your cPanel account and navigate to the Domains section.
- Choose the Redirects and choose whether you would like this to be a permanent 301 or temporary 302 redirect.
- Choose the domain name you would like to redirect and enter the URL of where you would like to redirect the website.
- Choose whether to redirect www. only, both with or without www. or do not redirect www. only.
- Choose whether you want to enable Wild Card Redirect and then click Add.
You have just created a new website redirect and this can be repeated for any additional websites you would like to redirect.
Now, when you click on the Redirects section you will see a list of all currently active redirects for your domain names. If you want to delete a redirect, simply click on Delete from the right-hand side and confirm.
Redirect types explained:
Permanent 301 – This is a permanent redirect used when you want to permanently redirect one domain to another. For example, you may want to use this if you have multiple TLDs for the same domain such as .com and .net or if you have simply changed the primary domain for your main website.
Temporary 302 – This is a temporary redirect and should be used if you only want to redirect to another website for a short period of time as it will not update the information on a visitors browser, unlike a permanent 301 redirect.
Wild Card Redirect – Choosing Wild Card Redirect will redirect all files within a directory to the same filename in the redirected directory, although you cannot use a Wild Card Redirect to redirect your main domain to a different directory on your site.