Domains and DNS
Create and test a redirect in cPanel
In cPanel > Redirects you can send visits to a domain or a path to another URL. The origin must resolve to that hosting; if visits reach another provider, the rules in this cPanel play no part.
Choose the type
Use Permanent (301) when the content has moved for good and Temporary (302) when you expect to get the old address back. If you are testing a configuration, start with 302 to limit the effects of a cached permanent redirect.
A redirect does not copy content or keep a page you have deleted. Prepare the destination first and check that it offers the content that people visiting the old URL expect.
Set up origin and destination
- Select the specific domain. All Public Domains affects every domain in the account; use it only if that is the intended scope.
- Enter the origin path in the field after the domain. For the whole domain, use its root.
- In Redirects to, enter the full destination URL, including
https://. - Choose whether it affects the name with
www, withoutwwwor both. - Turn on Wild Card Redirect if the destination keeps the same path structure.
- Click Add and review the entry in the list.
With a wildcard, https://example.com/catalogo can go to https://example.net/catalogo. If the paths have changed, prepare specific mappings; sending every page to an unrelated home page does not keep them useful.
Test and fix
Test HTTP and HTTPS, with and without www, the home page and an internal path. The origin needs a valid certificate to receive HTTPS visits before it can redirect them. Check that the destination does not send visitors back to the origin or add unnecessary hops.
If an application ignores the rule, review the order of the redirects and the CMS. Save a copy of the .htaccess before editing it and avoid changing automatically generated blocks without understanding their scope.
To change a redirect in this interface, note down its values, delete the entry and create it again. Also check the browser cache: removing a rule from the server does not clear redirects a visitor has already stored.
You may also find useful
- Load another website in an iframe Shows how to load another website inside an iframe while keeping the visible domain, which file to c...
- Redirect a domain while keeping certain folders Provides ModRewrite rules to move a domain to another address without affecting an intranet or other...
- Redirect a domain without ordering hosting Shows how to send a domain without hosting, a specific path or all its URLs to another destination f...
- Redirect secondary domains to a main domain Explains how to point several secondary names to the main one using DNS and redirects in the current...
Something wrong or out of date? Tell us and we will review it.