You can lock a directory with a password by using the cPanel "Password Protected Directories" option.
1. Log into your cPanel account.
2. In the "Files" section, click on the "Directory Privacy" icon.
3. Click the icon to open a folder.
4. Click on the name of the directory you want to protect.
5. Under "Security Settings", check the box next to "Password protect this directory" and enter a name for the protected directory, e.g. "Password Protected Area" or any word\s of your choice. Then click on the "Save" button.
6. Now click on the "Go back" button.
7. Scroll down the page and under "Create User" fill in the username and password fields or use password generator option to generate a new random password. Then save username and password somewhere for future references. You will need them when you want to open your password protected directory. Click on the "Save" button.
Now, when you will try to open your password protected directory in your browser through the www.example.com/protectedfolder, your browser will prompt you to enter username and password you have entered on the step 7.
- 0 Users Found This Useful