---
title: How to setup directory privacy in cPanel
description: "In this article, you will learn how to setup directory privacy in cPanel. By setting up directory privacy in cPanel you're able to password-protect directories that visitors may try and access, these will now require a username and password to…"
url: "https://staging2.conorbradley.co.uk/kb/how-to-setup-directory-privacy-in-cpanel/"
updated: "2026-01-28"
category: "Using C-Panel (Control Panel) / cPanel Security Features"
tags:
  - cpanel
  - hosting
  - security
  - Users
---

# How to setup directory privacy in cPanel

In this article, you will learn how to setup directory privacy in cPanel. By setting up directory privacy in cPanel you're able to password-protect directories that visitors may try and access, these will now require a username and password to access the content.

## How to add password protection to a directory in cPanel

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

1. Log in to cPanel.
    If you're unsure of how to log in to cPanel please [follow this article](https://staging2.conorbradley.co.uk/kb/how-to-access-cpanel/).
2. In the search bar type, **directory privacy** then click it.
3. Find the directory you wish to protect.
4. Click **Edit**.
5. Click the password protect this directory **checkbox**.
6. Enter a name for the protected directory.
7. Click **Save**.
8. Click **Go Back**
    Now you have password-protected the directory. We will need to create a user.
9. **Type a username** in the username field.
10. **Type a password** in the new password feild.
11. Type the same password in the confirm password field.
12. Click **Save**.

![How to add password protection to a directory in cPanel conor bradley digital agency](https://staging2.conorbradley.co.uk/wp-content/uploads/How-to-add-password-protection-to-a-directory-in-cPanel-conor-bradley-digital-agency.png)

## How to remove the password protection to a directory in cPanel

To remove the password protection to a directory in cPanel, follow these steps:

1. **Log in** to cPanel.
    If you're unsure of how to log in to cPanel please [follow this article](https://staging2.conorbradley.co.uk/kb/how-to-access-cpanel/).
2. In the search bar type, **D****irectory privacy** then click it.
3. Find the directory you wish to protect.
4. Click **Edit**.
5. Uncheck the password protect this directory checkbox.
6. Click **Save**.

![How to remove the password protection to a directory in cPanel conor bradley digital agency](https://staging2.conorbradley.co.uk/wp-content/uploads/How-to-remove-the-password-protection-to-a-directory-in-cPanel-conor-bradley-digital-agency.png)

 [Facebook](https://www.facebook.com/conorbradleydigitalagency) | [Twitter](https://twitter.com/ConorAgency) | [Instagram](https://instagram.com/conorbradleydigitalagency) | [LinkedIn](https://www.linkedin.com/company/conor-bradley-digital-agency)  | [Youtube](https://youtube.com/conorbradleydigitalagency) | [Vimeo](https://vimeo.com/conorbradleyagency) | [Blog](https://staging2.conorbradley.co.uk/blog/) | [Knowledge Base](https://staging2.conorbradley.co.uk/kb/) | [Client Area](https://billing.conorbradley.co.uk/login) | [Google Business](https://g.page/r/CUSmNJ3lhko9EBA)
