← Back to Knowledgebase

How to Password Protect a Folder in cPanel

Restrict access to a private website folder using cPanel Directory Privacy.

Password protection is useful when you want to restrict a folder, staging site, or private download area. Log in to cPanel and open Directory Privacy. Browse to the folder you want to protect, such as a test folder inside public_html. Select the folder and tick the option to password protect it. Enter a name for the protected area, then save. Next, create a username and strong password for access. Visit the folder URL in a browser to check that it asks for a login. Do not use this as the only protection for highly sensitive data. Remove old users when access is no longer needed.

Ticket WhatsApp Client Area