How to password protect a folder in cPanel

Published by: 0

If you want place a password on a web accessible folder then this course is for you.

1) Log into your cPanel account. How to login to cPanel

2) Locate the Files section and select Directory Privacy

Files Section

3) You should see a similar directory tree layout. Click on the folder icon to expand that folder. In this case we want to protect a folder inside public_html.

4) In our public_html folder, we have a sub-folder called webdev and we want to password protect that. To do so we will click on the folder name itself.

5) You should see a similar screen on the follow page. To enable password protection in this folder, make sure to check the checkbox Password protect this directory.

Enter a name for the protected directory: This is the name you want it to display when the browser is prompting for the login. In this example we are using Protected Area 51. Hit Save.

Now you would need to add a user to have access to this folder. Hit back on your browser and fill in the user and it’s password you want to have access to this protected folder. Note this user is different than your cPanel account. It can set to anything.

6) Now if you have done everything correctly, your browser should ask you for a login when you try to reach that folder

Note: Password protected folder is only intended for browser access. It will not stop FTP accounts that have access to it.