Can I password protect directories? Print

  • 0

Can You Password Protect Directories and How to Do It in cPanel?

Absolutely, cPanel allows you to easily set up password-protected directories, adding an extra layer of security to your web assets. This feature is particularly beneficial for safeguarding sensitive information or exclusive content. Below are step-by-step guidelines to enable this feature using cPanel’s intuitive interface.


  • Active cPanel hosting account
  • Basic familiarity with file and directory structure

Step 1: Access Your cPanel Account

Log in to your cPanel account using your credentials. Typically, you can access cPanel through or via your hosting dashboard.

Step 2: Locate the Directory Privacy Feature

Once you’re in, navigate to the "Files" section in the cPanel dashboard. Locate and click on the "Directory Privacy" icon.

Step 3: Choose the Directory to Secure

You will be presented with the file structure of your web hosting account. Browse through the directories by clicking on the folder icons. Once you identify the directory you wish to protect, click on its name to proceed.

Step 4: Initiate Password Protection

In the resulting "Directory Privacy" settings, tick the checkbox next to "Password protect this directory." Provide a display name for this secure directory under "Name the protected directory." This name will appear in the authentication prompt for end-users. Click the "Save" button to enforce these settings.

Step 5: Configure Authorized Users

Post the initial setup, it’s time to specify who can access this directory. Under the "Create User" section, populate the username and a robust password (preferably using a mix of alphanumeric characters and symbols). Click "Save" to finalize.

Feel free to add more users by repeating this process.

Step 6: Verify the Setup

Open a new browser window, preferably in incognito or private mode, to avoid cached credentials. Navigate to the URL of the directory you just secured. A login prompt should appear. Input the username and password you configured to confirm that the access control is operational.

Note: This is just one aspect of web security. For more comprehensive protection, consider implementing HTTPS, regular backups, and other security measures.

If you encounter any challenges or require additional support, feel free to consult our Knowledgebase at or submit a support ticket at

By following these steps, you can fortify your directory using cPanel's built-in features, thereby upholding web security norms.

Was this answer helpful?

« Back