How to redirect a domain

Creating domain redirects via cPanel

Lachlan

Last Update a month ago


This topic covers processes relating to a cPanel service.
You will need to be logged into the cPanel account to follow the steps.
If you're not sure how to access your cPanel service — please, follow this guide before continuing: How do I Login to cPanel?


Domain redirects in cPanel are useful when you need to have visitors sent to from one website to another (e.g. people visiting example.com can be redirected to example.com.au). 

There are different types of redirects, most commonly, permanent (301) and temporary (302). 


  • Permanent 301 redirects are equivalent to a "We Have Moved" sign on a physical business for example. A 301 redirect tells browsers and search engines that the site has permanently moved to a new location. Search engines will update their records with the new page's details, which can help keep your SEO rankings etc.

  • Temporary 302 redirects are for short-term changes, like when you're updating a website or running a promotion etc. Search engines understand this as a temporary change and don't update their ranking data.

Creating redirects:

1. First, log into cPanel

2. Next, navigate to the 'Redirects' tool listed in the "Domains" section

3. Once at the Redirects page, select the types of redirect you want. From the dropdown menu under 'Type' select:

  • Permanent (301) if you want to set up a permanent redirect. This is the most common option and helps search engines know the page has moved permanently.
  • Temporary (302) if the redirect is only temporary.
4. In the https?://(www.)? dropdown, select the domain for which you want to create the redirect.


  • If you want it to work for both www and non-www versions of your domain, you don't need to add any further information; this will be handled automatically.

5. Specify the Page or Domain to Redirect


  • For a Domain-wide Redirect:

    • Leave the / (blank) field empty. This will redirect the entire domain.
    • Example: If you want to redirect example.com to newdomain.com, leave the field empty.
  • For a Specific Page Redirect:

    • Enter the page path you want to redirect. For example, if you want to redirect example.com/old-page, enter old-page in this field.
6. Enter the Target URL


  1. In the Redirects to field, type the full URL of the page you want users to go to. Be sure to include the https:// or http:// part.
  2. Make sure the URL is correct and that it starts with https:// if your site uses SSL (most do these days).
7. Choose the Redirect Options


  1. www Redirection: You can decide whether:

    • Redirect with or without www.
    • Redirect with www only.
    • Redirect without www only.
  2. Typically, choosing the default option (Redirect with or without www) is best unless you have a specific reason otherwise.

  3. Wildcard Redirect: Leave this unchecked unless you want all pages within a directory to redirect to the same page on the new domain. This is more advanced and not needed for simple redirects.

8. Click "Add" to create the redirect. Double-check that all the details are correct, then click the Add button. A confirmation message will appear to let you know the redirect was successfully created.

Removing redirects:

1. First, log into cPanel

2. Next, navigate to the 'Redirects' tool listed in the "Domains" section

3. Scroll down to the Current Redirects section, where you can manage existing entries, and go to actions tab for the redirects that you want to remove, then click 'Delete' button.

4. Once you click the delete button, a confirmation message will appear with the redirect details. Please click "Remove Redirect" to confirm your action.

5. If the redirect removal is successful, a green notification bar will appear, confirming that the redirect has been removed.

Troubleshooting:

  • If your redirect doesn’t work, clear your browser’s cache and try again. Sometimes old settings are cached, and you need to refresh to see the new redirect.
  • Make sure the target URL is live and correct. An incorrect URL will lead to a “Page Not Found” error.

Important: Always choose the correct redirect type (301 for permanent and 302 for temporary) to avoid confusing search engines and users.

Setting up redirects in cPanel is a quick and straightforward process once you know where to go. Whether you need to redirect an entire domain or a specific page, the Redirects tool in cPanel provides a user-friendly interface to get it done.

Still need help? Message Us