> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Protecting directory privacy in cPanel

> Discover how to password-protect directories in cPanel with this easy guide.

This article describes how to use cPanel to protect specific directories with a password. Visitors to password-protected directories must enter a username and password to view the directory's contents.

## Adding password protection to a directory

When you add password protection to a directory, you provide a name for the directory that will appear in users' web browsers when they are prompted for a username and password. Then you create users and passwords to specify who can access the directory.

<Note>
  When you protect a directory with a password, all directories beneath it are automatically protected as well.
</Note>

To add password protection to a directory, follow these steps:

1. Log in to cPanel.
   > 📘 Note
   >
   > If you do not know how to log in to your cPanel account, please see [this article](/docs/accessing-cpanel).

2. On the **Tools** page, in the **Files** section, click **Directory Privacy**:\
   ![](https://static.hosting.com/kb/kb-cpanel-jupiter-files-directory-privacy-icon.png)

3. Click the name of the directory that you want to protect.

   > 📘 Note
   >
   > You can click the folder icon next to a folder name to open the folder.

4. Click **Edit**.

5. Under **Security Settings**, select the **Password protect this directory** check box.

6. In the **Enter a name for the protected directory** text box, type a name for the protected directory.

7. Click **Save**.

8. Under **Create User**, type a username in the **Username** text box.

9. In the **New Password** text box, type the user's password.

10. In the **Confirm Password** text box, retype the user's password.

    > 👍 Tip
    >
    > You can click **Password Generator** and cPanel generates a random, strong password for you.

11. Click **Save**. cPanel adds password protection to the directory.

    > 📘 Note
    >
    > You can add multiple users to a password-protected directory.

## Removing password protection from a directory

You can remove password protection from a directory when you no longer want to protect it with a password. You do not need to remove the usernames and passwords that you created for the directory. All usernames and passwords are retained when you remove password protection from the directory, but they become inactive. If you subsequently re-enable password protection for the directory, you can use the same usernames and passwords again.

To remove password protection from a directory, follow these steps:

1. Log in to cPanel.
   > 📘 Note
   >
   > If you do not know how to log in to your cPanel account, please see [this article](/docs/accessing-cpanel).

2. On the **Tools** page, in the **Files** section, click **Directory Privacy**:\
   ![](https://static.hosting.com/kb/kb-cpanel-jupiter-files-directory-privacy-icon.png)

3. Click the name of the directory for which you want to remove password protection.

4. Click **Edit**.

5. Under **Security Settings**, clear the **Password protect this directory** check box.

6. Click **Save**. cPanel removes password protection for the directory.

## Related articles

* [IP Blocker](/docs/ip-blocker)

* [Hotlink Protection](/docs/hotlink-protection)

* [Leech Protection](/docs/leech-protection)

* [Managing GnuPG keys in cPanel](/docs/gnupg-key-management)
