How do I set up a domain redirect?
Use the Redirects tool in cPanel to send one domain, subdomain or page to another address, pick 301 or 302, and confirm the change works.
A redirect sends anyone who visits one address straight to another one. It is what you want after moving a site to a new domain, retiring an old page, or forcing every visit to land on a single version of your address. cPanel has a Redirects tool for this, so you do not need to edit any files by hand.
Before you start, log in to cPanel. The domain you are redirecting away from must already be on your hosting account, either as your main domain or added under Domains. A domain that still points its nameservers somewhere else cannot be redirected here.
Pick the right type
There are two choices, and the difference matters more than it looks.
Permanent (301) tells browsers and search engines that the move is final and that the new address should replace the old one in their records. Use it when a page or a whole site has moved for good.
Temporary (302) says the change will be reversed later. Use it for a maintenance page, a seasonal landing page, or anything you plan to undo.
If you are unsure, start with temporary. Browsers cache permanent redirects aggressively, so a 301 set by mistake can be awkward to unwind.
Add the redirect
- In cPanel, open the Domains section and click Redirects.
- Under Type, choose Permanent (301) or Temporary (302).
- In the domain dropdown, select the domain or subdomain you are redirecting from. Choosing "All Public Domains" applies the rule to every domain on the account, which is rarely what you want.
- Leave the slash field empty to redirect the whole domain, or type a path (for example
old-page) to redirect just that page. - In the "Redirects to" box, enter the full destination address including
https://. - Under www redirection, "Only redirect with www" catches only the www version, while "Redirect with or without www" catches both. Both is the usual choice.
- Leave Wild Card Redirect unchecked unless you want every path on the old domain sent to the matching path on the new one.
- Click Add, then confirm on the next screen.
The new rule appears in the list at the bottom of the page, where you can delete it later if you change your mind.
Check it works
Open a private or incognito window and visit the old address. You should land on the destination, and the address bar should show the new URL. A private window matters here: a normal window may still be holding a cached copy of an earlier redirect.
If the old domain served a site before, also click through a few of its links to make sure they end up somewhere sensible rather than on an error page.
If it didn't work
Your browser cached an older redirect. Clear the cache, or test in a private window or a different browser.
A .htaccess rule is competing with the new one. WordPress, security plugins and SEO plugins all write redirect rules, and whichever rule appears first in the file wins. Check .htaccess in File Manager.
The redirect points at itself. Sending example.com to example.com creates a loop and most browsers will report too many redirects. Double-check the destination address.
Still stuck? Send us the old and new addresses at drivenhost.com/support and we will take a look.
More in Domains & DNS
Stuck partway through? Support is answered by the engineers who run the servers, around the clock.