Overview
The Redirect interface allows you to send all of the visitors of a domain or particular page to a different URL. For example, if you create a page with a long URL, use the interface to add a redirect from a short URL to the long URL. Visitors can enter the short URL to access the content of the long URL.
In cPanel, the term “redirect” refers to a feature that allows you to automatically forward traffic from one URL to another.
Login your control panel with login credential



- Select a domain name from the menu, or select **All Public Domains** to all of the domains that your cPanel account controls.
- Select one of the following settings: …
- Click Add.
Add a redirect
- Select a redirect type from the Type menu.
- Permanent (301) — This setting notifies the visitor’s browser to update its records.
- Temporary (302) — This setting does not update the visitor’s bookmarks.
- 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 next text box, enter the rest of the URL from which you wish for the server to visitors. For example, if you wish to redirect
http://example.com/directory.file.html
to another URL, enterdirectory/file.html
in this text box. - In the to text box, enter the URL to which you wish to users.
Important:
You must specify a protocol in this text box. For example,
http://
,https://
, orftp://
. - Select one of the following settings:
- Only redirect with www. — This setting only visitors who enter the www. prefix before the domain name part of the URL.
- Redirect with or without www. — This setting 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 domain name part of the URL.
Note:
The interface disables the 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 setting and
example1.com
redirect toexample.com
, then a visitor who tries to access thehttp://example1.com/pic.jpg
URL redirect to thehttp://example.com/pic.jpg
URL - Click Add.
- To test the redirect, click the link under Directory in the Current table. If you properly configured, the system directs you to the original domain.
To add a redirect where the original domain appears in the browser’s address bar, create a subdomain and rd it to your chosen domain. You can create a subdomain in cPanel’s Domains interface (cPanel » Home » Domains » Domains).
Redirect via third-party applications
When you add a with cPanel interface, the system places rules at the bottom of the .htaccess
file. Some third-party applications will ignore your rule because those applications only read rules and configurations that their section of the .htaccess
file contains.
Examples for permanent and temporary redirects
- permanent — This setting notifies the visitor’s browser to update its records.
- temporary — This setting does not update the visitor’s bookmarks.
Permanent
The following is a permanent of an entire site from its original location to example.com:
301 / http://example.com/
The following is a permanent of a page on example.com to a different page on example.com:
301 /original.html http://www.example.com/new.html
The following is a permanent of an entire directory on example.com to a different directory on example.com:
301 /old-directory http://www.example.com/new-directory
Temporary
The following is a temporary of an entire site from its original location to example.com:
302 / http://example.com/
The following is a temporary of a page on example.com to a different page on example.com:
302 /original.html http://www.example.com/new.html
The following is a temporary of an entire directory on example.com to a different directory on example.com:
302 /old-directory http://www.example.com/new-directory
It's important to note that when you set up a,
it may take some time for changes to propagate across the internet,
so the may not take effect immediately. Additionally,
proper configuration of can help maintain a positive user
experience and ensure that search engines handle the changes appropriately.