If you activate and configure this option in your cPanel, you can restrict access to a directory of your website.
You can do this as follows:
1. Log into your cPanel
2. In the Files section, click on Directory Privacy:
3. In the next section, you can see all the folders that are located in the root of your hosting package. Click on the name of the directory you want to password protect. If you want to see and protect a folder that is inside of listed you need to click on the icon next to the folder name (eg. You want to protect a folder inside / public_html directory)
4. To protected folder with a password, in the next section, you must mark the option Password Protect this directory. In the Enter a name for the protected directory field, enter the name that will appear in the header field for login later in the approach. After that, save the settings by clicking the Save button.
To add a user, and that someone could access, you need to fill the Create User section. Enter Username, and in the fields New Password and Confirm Password, enter the password.
After adding a new user, save the setting with one click on button Save.
How to remove the protection?
Protecting of the directory can be removed by unchecking Password Protect this directory and save a new state by clicking on the button Save.