Password-protect a folder
Updated on 10 November 2026
- In cPanel, open Directory Privacy.
- Choose the folder to protect (for example public_html/private), then Edit.
- Tick Password protect this directory, name the area and save.
- On the same page, create a user and its password.
The browser now asks for these details for everything in that folder.