Redirects
Valid for versions 82 through the latest version
Version:
82
Last modified: 2025 July 23
Looking for this interface?
Your hosting provider can enable or disable this interface in WHM's Feature Manager interface (WHM >> Home >> Packages >> Feature Manager).
Overview
The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL. A redirect is useful when you want to seamlessly send your website visitors to another web address. For example, you could use a redirect to allow your visitors to enter a short URL to access a page with a longer URL.
You can also use redirects like this to avoid storing sensitive customer information. For example, payment processors like Stripe offer links to secure pages where they process payment information so that you don’t have to store any credit card data.
- You cannot change an existing redirect. To modify a redirect, you must delete it, and then recreate it.
- If you wish to redirect a domain’s visitors from the insecure version of the website to the secure version, use the Force HTTPS Redirect option in cPanel’s Domains interface (cPanel » Home » Domains » Domains).
- If you need to make any manual changes, read our How to Configure Redirects Manually documentation.
Add a redirect
To add a redirect, perform the following actions:
- Select a redirect type from the Type menu.
- Permanent (301) — This setting indicates that a website has moved to a new, permanent location and prompts search engines to update their records.
- Temporary (302) — This setting indicates that a website has moved temporarily. This may be useful when a site is unavailable for maintenance, for example. This has no effect on search engine records.
- Select a domain name from the menu, or select **All Public Domains** to redirect all of the domains that your cPanel account controls.
- In the
/
text box, enter the rest of the URL that you want to redirect users from. For example, if you wish to redirecthttp://example.com/directory/file.html
to another URL, enterdirectory/file.html
in this text box. - In the Redirects to text box, enter the URL that you want to redirect users to.
Important:
You must specify a protocol in this text box. For example,
http://
,https://
, orftp://
. - Select one of the following options:
- Only redirect with www. — This setting only redirects visitors who enter the www. prefix before the domain name part of the URL.
- Redirect with or without www. — This setting redirects all users, regardless of whether the visitor enters the www. prefix before the domain name part of the URL.
- Do Not Redirect www. — This setting does not redirect users who enter the www. prefix before the the domain name part of the URL.
Note:
The interface disables the www. redirection setting if you select **All Public Domains**.
- Select the Wild Card Redirect setting if you wish to redirect all files within a directory to the same filename in the new directory. For example, if you enable the Wild Card Redirect setting and
example1.com
redirects toexample.com
, then a visitor who tries to access thehttp://example1.com/pic.jpg
URL redirects to thehttp://example.com/pic.jpg
URL. - Click Add.
- To test the redirect, click the link under Directory in the Current Redirects table. If you properly configured the redirect, the system directs you to the domain.
To add a redirect where the original domain appears in the browser’s address bar, create a subdomain and redirect it to your chosen domain. You can create a subdomain in cPanel’s Domains interface (cPanel » Home » Domains » Domains).
Redirects via third-party applications
When you add a redirect with the cPanel interface, the system places redirect rules at the bottom of the .htaccess
file. Some third-party applications will ignore your rules because those applications only read rules and configurations that their section of the .htaccess
file contains.
If you use a third-party application or content management system to add a redirect, such as WordPress®, the redirect may not function properly. To avoid this issue, you can configure your redirects manually.
The Current Redirects table
The Current Redirects table lists the redirections that currently exist on your account. To search for a redirection, enter the search criteria in the Search text box and click Go.
The table lists the following information about redirects:
Label | Description |
---|---|
Domain | The domain to redirect. ALL represents all of the account’s publicly-available domains. |
Directory | The directory to redirect. Click the link to test the redirection. |
Regular Expression | The system will redirect any URL that matches the regular expression in this column. |
Redirect URL | The URL to which you wish to redirect users. |
HTTP Status Code | The numerical HTTP Status Code of the redirect. |
Type |
|
Match www. | Only redirect visitors who enter the www. prefix before the domain name part of the URL. |
Wildcard | Redirect all files within a directory to the same filename in the new directory. For example, if you enable the Wild Card Redirect setting and example1.com redirects to example.com , then a visitor who tries to access the http://example1.com/pic.jpg URL redirects to the http://example.com/pic.jpg URL. |
Actions | Available actions for the redirection:
Important:
Most web browsers add redirections to a cache. Visitors may need to clear their web browser cache to remove the redirection from their web browsers
|