Free migrationUK web hosting from £2.99 a month, with backups every six hours and a 60-day money-back guarantee.UK web hosting from £2.99 a month.See hosting plans

How to redirect a page or website in cPanel

On this page

This guide shows how to send visitors from one address to another. You can move a single page, point a whole domain at a different site, or tidy up old links after a redesign, using the Redirects tool in cPanel or a few lines in .htaccess.

301 or 302

cPanel asks you to pick a type before it creates anything.

  • Permanent (301). Use this when the old address is gone for good. Search engines move the old page’s ranking across to the new one, and browsers remember the jump.
  • Temporary (302). Use this for short spells, such as sending people to a holding page during a sale or while a section is rebuilt. Search engines keep the old address listed.

If you aren’t sure, a 301 is right for most moves. Browsers cache a 301 hard, so test in a private window and get it right before you share links.

Redirect a single page

  1. Log in to cPanel.
  2. In the Domains section, open Redirects.
  3. Set Type to Permanent (301) or Temporary (302).
  4. In the https?://(www.)? dropdown, pick the domain the old page lives on.
  5. In the box after the slash, type the old path, for example old-prices.html or services/old-page.
  6. In Redirects to, type the full new address, for example https://yourdomain.co.uk/prices/.
  7. Leave www. redirection on Redirect with or without www. unless you have a reason to change it.
  8. Leave Wild Card Redirect unticked for a single page.
  9. Click Add.

Open the old address in a private browser window to check it lands on the new page.

Redirect a whole domain to another site

Use this when you have an old domain, or a spare one, and want every visitor to end up on your main site.

  1. In cPanel, open Redirects.
  2. Choose Permanent (301).
  3. Pick the old domain from the dropdown and leave the path box empty.
  4. In Redirects to, type the address of the main site, such as https://yourdomain.co.uk/.
  5. Tick Wild Card Redirect if you want olddomain.co.uk/contact to go to yourdomain.co.uk/contact. Leave it unticked to send every old page to the home page.
  6. Click Add.

The old domain must already be on your hosting as an addon or alias, and its DNS must point at our servers. See how to add another domain to your hosting.

The www option

The www. redirection setting has three choices:

  • Only redirect with www. catches www.yourdomain.co.uk only.
  • Redirect with or without www. catches both. This is the usual choice.
  • Do Not Redirect www. catches the bare domain only.

If you want to make your site always use www, or never use it, do that with a single rule in .htaccess rather than lots of redirects.

Remove a redirect

Under Current Redirects lower down the Redirects page, click Delete next to the one you no longer want. Clear your browser cache afterwards, because a 301 can stick around in the browser even after it’s removed from the server.

Using .htaccess instead

The Redirects tool writes rules into .htaccess for you. You can also add them by hand, which is handy for lots of pages at once.

  1. Open File Manager and go to public_html.
  2. Under Settings, make sure hidden files are shown (the Show Hidden Files option).
  3. Right click .htaccess and choose Copy to make a spare copy first.
  4. Edit .htaccess and add lines near the top, one per page:
Redirect 301 /old-page.html https://yourdomain.co.uk/new-page/
Redirect 301 /shop/winter-coats https://yourdomain.co.uk/shop/coats/
  1. Save and test each old address.

The first part is the old path, starting with a slash and without the domain. The second is the full new address.

WordPress sites

On WordPress, a redirect plugin is often easier than either method above. It lets you manage redirects from the dashboard, and many also log 404 errors so you can see which old links people still use. Pick a well reviewed plugin and keep it updated. Don’t run a plugin and cPanel redirects for the same page, or you may get a loop.

If it doesn’t work

  • The browser says “too many redirects”. Two rules disagree. See how to fix too many redirects.
  • The old page still shows. Your browser has cached it. Try a private window or a different device.
  • You get a 404 on the new address. Check the spelling of the target, including the trailing slash.
  • The whole site breaks after editing .htaccess. Put back the copy you made. A 500 error usually means a typo in the file. See what website error codes mean.

Still stuck? Open a support ticket and we’ll help.

Still stuck? Open a support ticket from your client area. Tell us your domain and which step went wrong, and we'll take it from there.
UK cPanel hosting from £2.99 a month

Every plan has cPanel, free SSL, backups every six hours and free migration.

See web hosting
Open in new tab