This feature allows you to protect certain directories of your account. If you enable this feature, the system prompts users for a username and password when they attempt to view content in a protected folder.
How Directory Privacy works
It’s important to understand how Directory Privacy on a folder works. When you choose to password protect a directory in cPanel, cPanel creates a rule in your .htaccess file.
This rule specifies that the folder is protected and the visitor will need to provide the proper username and password to log in and view the files.
Configure a password for a directory
- To password protect a directory, perform the following steps:
- Select the directory that you wish to protect.
- Click the appropriate folder iconto navigate to a different folder.
- Click the desired folder’s name to select it.
Note: A protected directory's subdirectories inherit their parent directory's password protection.
2. Select the Password protect this directory checkbox.
3. Enter a display label for the directory in the Name the protected directory text box.
Note: This name is only a label for the directory, and you should not confuse it with the directory's actual name.
4. Click Save.
After you complete this process, you must create a user that can access this directory.
Create a user
To create an authorized user for the directory, perform the following steps:
- Enter the desired username in the Username text box.
- Enter and confirm the new password in the appropriate text boxes.
Notes:The system grades the password that you enter on a scale of 100 points. 0 indicates a weak password, while 100 indicates a very secure password. Some web hosts require a minimum password strength. A green password Strength meter indicates that the password is equal to or greater than the required password strength. Click Password Generator to generate a strong password. For more information, read our Password & Security documentation.
Click Add Or Modify The Authorized User.
Note: To change the authorized user's password, enter the user's information again in the Create User section of the interface, but enter a different password for the user.
Remove password protection
To remove password protection from the directory, deselect the Password protect this directory check box in the Security Settings section of the interface and click Save.