- Login to cPanel control panel
- Find Files section and click on Directory Privacy. You will see the list of sub-directories.
- Click on 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 protected directory.
- Click on Save button.
- Scroll down the page, Add a username and password for that protected folder.
- Click on Add/modify user.
Updated on July 2, 2019