---
title: How to password protect a directory in DirectAdmin
description: "# How to Password Protect a Directory in DirectAdmin Want to allow only specific users access to a directory on your account? DirectAdmin includes a tool to password-protect any directory — commonly used for staging areas, private client files, or…"
url: "https://simplywebservices.net/docs/how-to-password-protect-a-directory-in-directadmin/"
updated: "2026-08-15"
category: DirectAdmin
---

# How to password protect a directory in DirectAdmin

# How to Password Protect a Directory in DirectAdmin

Want to allow only specific users access to a directory on your account? DirectAdmin includes a tool to password-protect any directory — commonly used for staging areas, private client files, or an extra layer of login security.

## How to Password Protect a Directory

1. [Log in to your DirectAdmin](https://simplywebservices.net/docs/how-to-log-into-the-directadmin-control-panel/) control panel by accessing https://yourdomain:2222
2. Navigate to **Password Protected Directories**
3. Click the **Find a Directory to Password Protect** link. The file manager window will open.
4. Locate the folder you want to block access to and click the Protect link
5. Enter a description for this protection (like *my private directory*), a username, and a password.
6. Check the **Protection Enabled** option and click the **Save** button. You will see a confirmation message: *Directory Protection Settings have been saved.*

### A Note on Protecting WordPress's wp-admin Folder

Password-protecting `wp-admin` is a common way to add an extra login layer to WordPress. However, `wp-admin` also contains `admin-ajax.php`, which many themes and plugins use for front-end features (like search, forms, or "load more" buttons) — even for visitors who aren't logged in. Protecting the whole folder can silently break these features.

**To avoid this**, add an exception for `admin-ajax.php` in your `.htaccess` file so it stays publicly accessible while the rest of `wp-admin` remains protected. [Contact us](https://simplywebservices.net/contact-us/) if you'd like help configuring this safely.
