How to set up password protected directories in cPanel? Print

  • 105

Password protected directories are important if you want only certain people to access certain parts of your website. Creating password protected directories are one way to set this up. This form of password protected directories isn’t the most advanced way to set up password protected directories, but it does the job quick and fast. It does lack some other features that a traditional PHP script would have as well. This option in cPanel actually modifies the .htaccess file to determine the access to these files. To set up a password protected directory, please do the following:

1. Click Password Protected Directories
2. To protect a folder inside another folder, you will need to click the folder to the left of the folder name. If you see the folder for which you would like to password protect already , then click the name of the folder.
3. Click the check box to the left of the text which states,”Directory requires a password to access via the web (you must check this to activate password protection).“ This will then lock the file.
4. Enter text for which you would like the pop up message to say when someone tries to access this folder/ file. You will enter the information to the right of the text which says, “Protected Resource Name (will display in browser’s password mask):
5. You will now need to add a user to be able to access this file. Add a user and a password in the fields which are at the bottom.
6. Click Add / Modify Authorized User

You have now just created a password protected directory and added a user to access it.

Was this answer helpful?

« Back