How do I password-protect a directory? Print

  • 0

You can lock a folder behind a login prompt using cPanel's built-in tool. Log in to cPanel and open Directory Privacy (sometimes called Password Protect Directories).

  1. Browse to and select the folder you want to protect.
  2. Tick Password protect this directory, give it a name, and save.
  3. Create a user by entering a username and password, then click Save to add them.

Now anyone visiting that folder must enter those credentials. This is great for staging areas, admin folders, or private downloads. To remove protection later, return to the same screen and untick the box. Note that this protects the whole directory, so place files you want public outside of it.


Was this answer helpful?

« Back