cPanel 60 Recently updated 2 min read

How to Password Protect a Directory in cPanel

How to Password Protect a Directory in cPanel

You can lock a directory with a password using cPanel's Directory Privacy feature. Follow the steps below to set it up:

  1. Log in to your cPanel account.
  2. In the Files section, click on Directory Privacy.
  3. Click on the directory you want to protect.
  4. Click on the Edit button next to the directory.
  5. Under Security Settings, check the box for Password protect this directory, then click on Save.
  6. Click on Go back.
  7. Scroll down the page. Under Create User, fill in the username and password fields, or use the Password Generator option to generate a new random password. Copy it to Notepad and click on Save.

If you try to open the password-protected directory in your browser via the URL www.example.com/myfolder, your browser will prompt you for credentials.

Related articles

Discussion

Loading the discussion…