Redirects send visitors and search engines from one address to another. Use them when you move a page, change domain, or want an old URL to keep working. cPanel's Redirects tool writes the rules into your .htaccess file for you, so you do not have to edit code.
Before you start
- Know the exact old address and the new destination, including
https://. - Choose the type:
- Permanent (301): the move is final. Search engines pass ranking to the new URL. Use this in almost every case.
- Temporary (302): for short-term moves, maintenance pages or A/B tests.
Create a redirect
- Open cPanel → Domains → Redirects.
- Pick Type: Permanent (301) or Temporary (302).
- In https?://(www.)? choose the domain, or ** All Public Domains **.
- In the path box after the slash, enter the old path, for example
old-page.htmlorblog/2023-offer. Leave it empty to redirect the whole domain. - In Redirects to, enter the full new address, e.g.
https://example.com/new-page/. - Under www. redirection choose Redirect with or without www. (most common), Only redirect with www. or Do Not Redirect www.
- Tick Wild Card Redirect if every file under the path should go to the same file name at the destination, e.g.
/docs/a.html→https://new.com/docs/a.html. - Click Add.
Common examples
| Goal | Domain / path | Redirects to | Wildcard |
|---|---|---|---|
| Move a whole domain | olddomain.com / | https://newdomain.com/ | Yes |
| Rename one page | example.com / about-us.html | https://example.com/about/ | No |
| Send a subdomain to the main site | shop.example.com / | https://example.com/shop/ | No |
Check the redirect
- Open the old URL in a private browser window; it should land on the new address.
- Browsers cache 301s strongly. If you change a 301, test in a new private window or with
curl -I https://example.com/old-page.htmland look for301andLocation:.
Force HTTPS is different
To send all http:// traffic to https://, do not add a redirect here; use the Force HTTPS Redirect switch in cPanel → Domains → Domains. See force HTTPS in cPanel.
Remove or edit a redirect
Scroll to Current Redirects at the bottom of the page and click Delete next to the rule. There is no edit button: delete it and add it again with the new values.
Note: Redirects are stored in the .htaccess file of the domain's document root. Plugins such as WordPress caching or security tools also edit that file, so keep a copy before big changes.
Troubleshooting
ERR_TOO_MANY_REDIRECTS
The destination redirects back to the source, often because WordPress, Cloudflare or a plugin adds its own redirect. Remove one side of the loop. See fix redirect loops.
Redirect does nothing
An earlier rule in .htaccess (for example WordPress rewrites) catches the request first. Open the file in File Manager and move the cPanel rules above the # BEGIN WordPress block.
500 error after adding a redirect
The .htaccess has a syntax error. Remove the last added lines. See fix 500 errors on cPanel.
