XL Hosts NL Knowledgebase

How to password protect a folder in cPanel

Restrict access to folders using Directory Privacy.

Back to all guides
Security

How to password protect a folder in cPanel

Open Directory Privacy in cPanel and browse to the folder you want to protect. Enable password protection, give the protected area a name, then create a username and password. Visitors who open that folder in a browser will need the login details before seeing files. This is useful for private downloads, staging areas, client previews or internal resources. Do not use it as the only protection for highly sensitive systems, but it is a quick and useful layer for simple folder access control. Test the folder in a private browser window after enabling it.

Need help? XL Hosts NL customers can open a support ticket from the client area and our team can check your hosting account safely.