Password protecting folders/directories on your web hosting account can be done easily. Firstly – you must login to your cPanel / Web hosting account.
If you need to know how to do this – click here.
Once logged in, locate the Files Section and click Directory Privacy.
On this next screen, you need to click on the folder/directory that you want to password protect.
You will now be taken to a screen that allows you to add a name to the protected folder and click Save button to update.
Finally – to complete the password protection – scroll down the screen to add a username and password to the directory.
Once you click the Save button the folder/directory is now protected. If anybody tries to access the URL of the folder/directory then they will be asked for the username and password to access it.
This type of solution is normally used to protect content that website owners want to charge a fee for before allowing access to it.