Redirecting one address to another
Use a redirect when a page has moved, or to send an old domain to your new website.
- In cPanel, open Domains › Redirects.
- Choose the type: Permanent (301) for a lasting move (best for search engines), or Temporary (302).
- Select the domain and enter the path to redirect, for example
/old-page. Leave the path empty to redirect the whole domain. - Enter the full destination address, for example
https://yourdomain.com/new-page. - Choose whether to redirect with or without
www, and click Add.
For WordPress sites, use a redirect plugin for individual pages instead, so the redirects are kept with the site. Use cPanel redirects for whole domains.
Password-protecting a folder
Directory Privacy asks visitors for a username and password before they can open a folder. It is useful for staging copies, private downloads and admin areas.
- In cPanel, open Files › Directory Privacy.
- Click the folder name to open it, then click Edit next to the folder you want to protect.
- Tick Password protect this directory, enter a name for the protected area and click Save.
- Click Go Back, then under Create User enter a username and a strong password and click Save.
The protection applies to the folder and everything inside it. To remove it, untick the box and save.