let's learn how to password protect a directory, so that people will need a password to view web pages within it.
Firstly log into your cPanel account.
Click Password Protect Directories in the security panel.
A popup window will open displaying your domain, click Go
Select the directory you want to password protect by clicking it's name
Check the Password protect this directory box and if the directory is not filled in type the name of the directory you want to protect
then click the save button.
The directory is now protected, now click the "Go Back" button.
We must now create at least one user, and assign them a password to access the directory
Enter a username here
Then enter and confirm a password
Click Add authorized user
The protected directory now has one user who has access to it. Repeat this process for each additional user you want to grant access for
You can see the active user for this directory here and can add or delete users from this page at any time
This is the end of the tutorial. You now know how to password protect directories, and assign users to them