Before you proceed to cPanel check out our web hosting plans →
In order to create a password protected directory in cPanel, follow the guideline:
First, you need to connect to your cPanel dashboard, which you can do by following steps:
- Log in to your account in our Clients Area: https://billing.hostens.com/clientarea
- Choose your Web Hosting(cPanel) service;
- Press the button “Access Control Panel” on the left menu and then the button “Click here to access control panel“.
In the main menu, choose “Directory Privacy” under section “Files“, you will see the view below:
When you see the list of the directories on your server, choose a directory, in which you will protect with a password. Let’s say we want to protect the “public_html” directory. Choose “public_html” and the new settings will be displayed, like below:
The most important thing here is to check the box “Password protect this directory“. Also, enter the name (it will not be an actual server, only a label), which will be protected, for example “giedrius” and press “Save” button.
After that, you need a user, to have access to this new password protected directory, you can do it in the same settings window. Simply fill the field:
- Username – new user to access the directory;
- New Password/Confirm Password – a password in order to access the direcotory.
Once you enter the details for new user, press “Save” button under to create and new user, which will be authorized for this directory. Now, you can check any folder in “public_html” directory for example “http://gie.hamster.tips/giedrius”. You will be asked to enter username and password, you created to access the content.
Note. This feature does not protect directories that users access via FTP, SFTP, Web Disk, or other services, or when they access files locally.
You can create few separate users for the same directory, with different credentials.