How to Set Up a 301 Redirect in cPanel

Send visitors from an old page or domain to a new address using a permanent redirect, then check for loops and unintended matches.

Open Redirects from the Domains tools in cPanel. No domain names or account details are shown. Open Redirects from the Domains tools in cPanel. No domain names or account details are shown.

Decide what should redirect

A 301 redirect tells visitors and search engines that an address has moved permanently. Write down the exact source URL and destination before you start. Confirm the destination opens correctly and serves the content visitors expect.

The source domain must still reach the hosting service that handles the redirect. It may also need a valid SSL certificate: a browser must establish HTTPS before it can receive an HTTPS redirect. A redirect does not move website files or email, and it does not replace DNS configuration.

For an application such as WordPress, an application-level redirect may be more suitable for an individual post or page. Avoid configuring competing rules in several places.

Create the redirect

  1. Open Redirects in cPanel’s Domains section.
  2. Select Permanent (301).
  3. Select the intended source domain. Avoid All Public Domains unless the rule is deliberately meant for every domain on the account.
  4. For a single page, enter its path in the path field. Leave it blank only when you intend the domain root to match.
  5. Enter the full destination URL, including https://.
  6. Choose whether the rule should match the www version, the version without www, or both.
  7. Leave Wild Card Redirect off for a simple one-page move. Enable it only if you want corresponding paths to be carried across and have checked those destination paths exist.
  8. Review the source and destination, then choose Add.

Test the old address

Open the original URL in a private browser window and check the final address and page. Test the www and non-www versions that the rule is intended to cover, and relevant HTTP and HTTPS URLs. For a path-preserving move, test more than the homepage.

A developer or support technician can also check the HTTP response to confirm the intended 301 and look for long redirect chains. A permanent redirect can be cached, so a previous test in your usual browser may not show a recent correction.

If you get a loop or the wrong destination

Compare the source and destination carefully. Check for an opposing rule in WordPress, a CDN or the hosting configuration. Do not add extra redirects until the existing chain is understood.

cPanel lists rules under Current Redirects. To change a cPanel-created rule, record its settings, remove that specific rule and recreate it correctly. Keep a backup before making manual changes to website configuration files.

For a simple HTTP-to-HTTPS change on the same domain, review the Force HTTPS Redirect control in Domains once SSL is working. Send support the original URL, expected destination and observed behaviour if the redirect still fails.

Related help

Further information: cPanel Redirects · cPanel: Configure redirects manually.

Need help? Open a support ticket with the affected domain and exact error. Never include your password.

Was this article helpful?
Still need help? Open a support ticket and our team will assist you directly.
Open a Ticket

Powered by WHMCompleteSolution