It is possible to add password protection to your web directories/folders, making it easy to lock things down whilst in development or when keeping pages away from the general public. Using password protection will set a username and password prompt for accessing a particular directory in web browsers. It sets up a htpasswd configuration.
- Login to your cPanel service.
- Click the Directory Privacy icon.
- Navigate to and click Edit next to the folder you wish to protect.
- Check the tickbox.
- Enter a name for the word protected directory.
- Click Save.
- Now click Back.
- Under Create User: enter the username and password combination you wish to set.
- Click Add/Modify authorized user.
The password protection is now in place!