How do I password-protect a directory in DirectAdmin?

Password protection adds a login prompt before anyone can view a folder on your site. It is handy for staging areas, private downloads, or admin sections. Here is how to set it up in DirectAdmin.

What this does #

  • Adds a username and password prompt to a specific folder.
  • Blocks access to everything inside that folder until the visitor logs in.
  • Works at the server level, separate from any application login.

Step-by-step: protect a directory #

  1. Log in to DirectAdmin (usually yourdomain.com:2222).
  2. Go to Advanced Features and click Password Protected Directories (sometimes under File Manager).
  3. Select or enter the folder path you want to protect.
  4. Enable protection and set a prompt name (the text shown on the login box).
  5. Create a username and password for access.
  6. Save your settings.

Adding more users #

  • Return to the same folder settings.
  • Add extra usernames and passwords as needed.
  • Remove users when they no longer need access.

Removing protection #

  1. Open the protected directory settings.
  2. Disable protection or delete the users.
  3. Save.

Tips #

  • Use strong, unique passwords.
  • Protect the exact folder you mean, not the whole site by mistake.
  • Combine with SSL so the login is encrypted.

Troubleshooting #

  • No login prompt appears: confirm protection is enabled on the correct folder.
  • Login keeps failing: re-enter the password to rule out typos.
  • Locked out: disable protection from DirectAdmin and set it up again.

Need help? #

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

What are your feelings

Your Account