How to password-protect a folder
Directory Privacy lets you put a username and password in front of any folder on your site — handy for staging areas or private files.
Protect a directory
- Log in to cPanel and, under Files, click Directory Privacy.
- Browse to and select the folder you want to protect.
- Tick Password protect this directory, give it a label, and save.
- Create a user and password for access on the same screen.
How it works
Anyone visiting that folder now sees a browser login prompt and must enter the username and password you set. You can add several users, and remove protection anytime by unticking the box.
Want to protect your whole site temporarily (for example while building it)? Ask us and we'll point you the right way.
