---
title: "How do I password-protect a directory in cPanel?"
description: "Password protection adds a login prompt before anyone can view a folder, useful for staging areas, private downloads, or admin sections. This guide explains how to set it up in cPanel. ## What it does It adds a username and…"
url: "https://disoh.com/pt/suporte/how-do-i-password-protect-a-directory-in-cpanel/"
updated: "2026-07-22"
category: Webhosting
---

# How do I password-protect a directory in cPanel?

Password protection adds a login prompt before anyone can view a folder, useful for staging areas, private downloads, or admin sections. This guide explains how to set it up in cPanel.

## What it does

It adds a username and password prompt to a specific folder, blocking access to everything inside until the visitor logs in. It works at the server level, separate from any application login.

## Protecting a directory

1. Log in to cPanel.
2. In the **Files** section, open **Directory Privacy**.
3. Navigate to and select the folder you want to protect.
4. Tick **Password protect this directory** and give it a name.
5. Save, then create a user with a username and password.

## Managing users

- Add more users for the same folder as needed.
- Remove users when they no longer need access.

## Removing protection

Return to Directory Privacy, select the folder, and untick the protection option, or remove the users.

## Tips

- Use strong, unique passwords.
- Protect the exact folder you intend.
- Combine with SSL so the login is encrypted.

## Troubleshooting

- **No prompt appears:** confirm protection is on the correct folder.
- **Locked out:** disable protection from cPanel and set it up again.

## Need help?

If protection is not working, our support team can check it over live chat.
