Skip to main content
A redirect sends visitors, and search engines, from one address to another. Use it when you move a page, rename your site, or want a second domain to open your main website. This guide shows you how.

Choose the type

If you’re not sure, use Permanent (301).

Set up a redirect in cPanel

1

Open Redirects

Log in to cPanel, type Redirects in the Search Tools box and open it.
2

Choose the type

Choose Permanent (301) or Temporary (302).
3

Choose what to redirect

Pick the domain from the list. To redirect the whole domain, leave the path box empty. To redirect one page, type its path, such as old-page.
4

Enter the new address

In Redirects to, type the full new address, starting with https://.
5

Add it

Click Add. Test it by opening the old address in a private (incognito) window.
To remove a redirect, find it in the list under the form on the same page and delete it.
Want your site to always open with https://? Use Force HTTPS Redirect instead. See Force HTTPS. For www problems, see www or non-www not working.

Redirect with an .htaccess file (advanced)

cPanel saves redirects in a file called .htaccess in your website’s folder. You can also edit it yourself, which helps when you have many redirects.
1

Open the file

In File Manager, open public_html. Click Settings and turn on Show Hidden Files. Right-click .htaccess and choose Edit. If there’s no .htaccess, create a file with that name.
2

Take a copy first

Copy the whole file into a text file on your computer before you change anything.
3

Add your redirects

Add one line per page at the top of the file, for example:
4

Save and test

Save the file and open the old addresses in a private window.
One typo in .htaccess can show a “500 Internal Server Error” on your whole site. If that happens, put back the copy you saved. On WordPress sites, don’t change the lines between # BEGIN WordPress and # END WordPress.

Moving your whole site to a new domain?

Redirect the old domain to the new one only after the new domain works. Keep the old domain registered and the redirect in place for at least a year, so links and search results keep working. See Change your website’s domain name. Need to lock a folder instead? See Password-protect a folder. Still stuck? Open a ticket with the old address and where it should go.