By default, cPanel allows you to password protect directories in your account that you wish to allow preferential access to. This can easily be done by clicking on the Password Protect Directories icon under the Security section within cPanel:
- Log in to cPanel.
- Click "Directory Privacy" underneath the "Files" heading.
- Find the directory you wish to password protect. to open a folder and see folders inside of it, click the folder icon. To select a folder to password protect, click the folder name.
- Check the "Password protect this directory." box.
- Enter a name for the directory, then click "Save".
- Next, you'll need to enter a user name, then enter a password twice.
- Click "Save" to enable password protection for this directory.