How to configure directory privacy in cPanel

Last modified: Monday November 27th, 2023

This article describes how to use cPanel to password-protect certain directories. Visitors must enter a username and password to view the contents of password-protected directories.

Adding password protection to a directory

When you add password protection to a directory, you specify the name of the directory that will be displayed in users’ web browsers when they are prompted for a username and password. Next, you need to create users and passwords, specifying who can access the directory.

When you password-protect a directory, all directories under it are automatically protected as well.

Please follow these steps to add password protection to a directory:

  1. Log in to cPanel.
  2. Click Directory Privacy on the Tools page, in the Files section:                                        How to configure directory privacy in cPanel directory privacy jupiter
  3. Click the name of the directory that you want to protect.
  4. To open the folder you can click the folder icon next to a folder name.
  5. Click Edit.
  6. To protect this directory check box select the Password under Security Settings.
  7. Type a name for the protected directory in the Enter a name for the protected directory text box.
  8. Click Save.
  9. Type a username in the Username text box under Create User.
  10. Type the user’s password in the New Password text box.
  11. Retype the user’s password in the Confirm Password text box.

    You can click Password Generator and cPanel generates a random, strong password for you.
  12. Click Save and cPanel adds password protection to the directory.

    It is possible to add multiple users to a password-protected directory.

Removing password protection from a directory

It is possible to remove password protection from a directory if you no longer want to password-protect it. To do this, you don’t need to delete the usernames and passwords you created for the directory. All usernames and passwords are retained when password protection is removed from the directory but becomes inactive. If you subsequently re-enable password protection for the directory, you can use the same usernames and passwords again.

Please follow these steps to remove password protection from a directory:

  1. Log in to cPanel.
  2. Click Directory Privacy on the Tools page, in the Files section:                                        How to configure directory privacy in cPanel directory privacy jupiter
  3. Click the name of the directory for which you want to remove password protection.
  4. Click Edit.
  5. Clear the Password to protect this directory check box under Security Settings.
  6. Click Save and cPanel removes password protection for the directory.

Looking for an outstanding cPanel-based web hosting provider? Try our web hosting packages with cPanel

Was this article helpful?
Views: 381

10 Years Beehosting!
Celebrate with 70% OFF + FREE Site Transfer.

Facebook Instagram linkedin

Beehosting.pro website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Menu