How do I password protect a directory or file?
Log into the cPanel (your_domain.com/cpanel)
Click on the "Access Menu"
Click on "Web Protect"
You may protect directories within your site from browsers by using a password to protect them. This allows you to restrict material to only authorized users or store sensitive material online. This has the same appearance and effect as the password protection on cPanel.
To password protect a directory:
Click on the "Web Protect" link/icon.
Navigate to the directory you wish to protect.
Select a folder by clicking on the folder name link, or open a folder by clicking on the folder icon.
Click the tick box next to the icon to select.
Enter the name that you want to appear in the Protected Resource Name field.
This is optional, though should be short without spaces if entered (like, SecureArea).
Click on the button to complete.
Generally, you now need to add at least one authorized user to enable access to the directory.