This feature is particularly useful when you would like to protect any sensitive directories on your web hosting account.
After you enable this feature you will get a prompt message whenever you try to log in.
Now you will be shown how to protect a directory with a password in this article.

cPanel allows you to password-guard directories. All of the files in the password-protected folders are now safe.

Note– cPanel can only protect folders; individual files cannot be protected. A protected directory can hold any file that needs to be protected. Furthermore, it does not secure directories accessed locally or via FTP, SFTP, or Web Disk.

Steps for Using a Password to Protect a Directory

1. Go to your cPanel account and log in.
2. Go to the Files section and select “Directory Privacy” from the menu.

3. Select the directory you wish to secure by clicking on it.
4. You’ll be taken to a page called “Set permissions for “/home/demoweb/public_html”

5. As shown in the screenshot, select the option Password guard this directory.

6. In the Enter, a name for the protected directory field of Security Settings, type the name of the selected directory. It’s worth noting that this is the directory’s label. It has no effect on the directory’s real name.

7. Finally, press the “Save button”

8. After that, a confirmation page will appear. Select Go Back from the menu.


9. Then you must create a user who has permission to access this directory. Fill in the Username, New Password, and Confirm Password sections under Create User. The Password Generator button will help you to generate a strong password.

10. Then click on Save button.

By samuel

Leave a Reply

Your email address will not be published. Required fields are marked *