Setting up redirects and password-protected folders Print

  • redirect, 301, directory privacy, password protect, cpanel
  • 0

Redirecting one address to another

Use a redirect when a page has moved, or to send an old domain to your new website.

  1. In cPanel, open Domains › Redirects.
  2. Choose the type: Permanent (301) for a lasting move (best for search engines), or Temporary (302).
  3. Select the domain and enter the path to redirect, for example /old-page. Leave the path empty to redirect the whole domain.
  4. Enter the full destination address, for example https://yourdomain.com/new-page.
  5. 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.

  1. In cPanel, open Files › Directory Privacy.
  2. Click the folder name to open it, then click Edit next to the folder you want to protect.
  3. Tick Password protect this directory, enter a name for the protected area and click Save.
  4. 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.


Was this answer helpful?

« Back