- Login to your cPanel account
- Click Password Protect Directories
- Click on the folder icon beside public_html and keep clicking on the folder icons until you find the directory you would like to protect
- Click on the name of the folder
- Tick the box after 'Password protect this directory'. Enter a name to appear in the pop up box when someone tries to visit this page e.g. Protected and click Save
- Click 'Go Back'
- Add a username and password (twice) and add a user login to be able to see the password protected folder
If you are having problems with the box prompting you for the username and password twice:
Many times this issue is caused by using http://domain.ext mixed with http://www.domain.ext - remember, to most web browsers domain.ext and www.domain.ext
are two completely different websites hence it will prompt for the
authentication multiple times (one for domain.ext, another for www.domain.ext).