How to password-protect a folder

Require a username and password before anyone can open a folder on your website.

cPanel1 min read

Steps

  1. Open Directory Privacy

    In cPanel, go to Files → Directory Privacy.

  2. Choose the folder

    Browse to the folder you want to protect and click Edit.

  3. Turn on protection

    Tick Password protect this directory, give it a name, and click Save.

  4. Create a user

    Under Create User, enter a username and password, then click Save.

Tips

  • This is useful for a staging site or a private area you’re still building.

Related guides