Directory Privacy adds a login prompt to any folder on your site — useful for a staging site, private downloads or an internal area.
Protect a folder
- Log in to cPanel and open Files → Directory Privacy.
- Browse to the folder you want to protect and click Edit next to it.
- Tick Password protect this directory, give the area a name (shown on the login prompt), and click Save.
- Under Create User, add a username and password, then click Save.
Visitors to that folder now need to log in. Add as many users as you like.
Tip: Protecting a folder also protects everything inside it. Avoid protecting public_html itself unless you want your whole site private.
Related articles
- How to Block an IP Address from Your Website
- How to Stop Other Sites Using Your Images (Hotlink Protection)
Still need a hand?
Our team is available 24/7. Submit a support ticket or call 877.821.HOST and we’ll walk you through it — or do it for you.