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

# Directory Privacy

> Password-protect a folder on your account using HTTP basic authentication. cPanel handles the .htpasswd file for you.

Directory Privacy locks a folder behind a username and password. Anyone trying to open a file in the protected folder gets a browser-native login prompt. cPanel manages the `.htpasswd` file under the hood.

Open it from cPanel home → **Files** → **Directory Privacy**.

<Frame caption="Directory Privacy listing folders with Edit buttons">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/file-management/directory-privacy/listing-light.png" alt="Directory Privacy showing folders with Private status and Edit buttons" className="block dark:hidden" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/file-management/directory-privacy/listing-dark.png" alt="Directory Privacy showing folders with Private status and Edit buttons" className="hidden dark:block" />
</Frame>

## Lock a folder

<Steps>
  <Step title="Browse to the folder">
    Click into the folder you want to protect. Use the **Home** button to reset, the folder icons to drill down.
  </Step>

  <Step title="Click Edit">
    Click **Edit** in the Actions column next to the folder you're inside.
  </Step>

  <Step title="Tick the box and save">
    Tick **Password protect this directory**, give it a label (shown to users in the login prompt), and save.
  </Step>

  <Step title="Add a user">
    Below the protect toggle, enter a username and password under **Create User**. Add as many users as you need. Any of them can log in.
  </Step>
</Steps>

## Common uses

* Staging or `/dev/` folders that aren't ready for public eyes
* Internal admin folders for tools that don't have their own login
* Files you want gated but don't want to wire up a full app login for

## Things to know

* Protection is HTTP basic auth. Browsers prompt for credentials and remember them per session.
* Search engines can't index a protected folder. The auth check fires before crawlers see anything.
* The `.htpasswd` file is stored outside the protected folder. Don't edit it manually unless you know what you're doing; cPanel can rewrite it on save.
* Removing protection: revisit the folder, untick **Password protect this directory**, save.

## Need a hand?

<CardGroup cols={2}>
  <Card title="Open a ticket" icon="life-ring" href="https://members.noxity.io/submitticket.php">
    Best for anything that needs an account check or a config change on our end.
  </Card>

  <Card title="Live chat" icon="messages" href="https://noxity.io/contact">
    Faster for quick questions during business hours.
  </Card>
</CardGroup>
