How to Password Protect a Directory in cPanel
- Login to cPanel control panel
- Find the Files section and click on Directory Privacy. You will see the list of sub-directories.
- Click on the sign icon which is present to the left of public_html to see the contents. You can see sub-directories of public_html.
- Select the subdirectory and click on it to update its access requirements.
- In the Security Settings, check the Password protect this directory checkbox.
- Enter the name of the protected directory.
- Click on the Save button.
- Scroll down the page, Add a username and password for that protected folder.
- Click on Add/modify the user.