Skip to main content
TrustServers Knowledge Base

Tip: Start typing to get instant search results.

Table of Contents

How to Password-Protect a Folder on My Website via the Control Panel

Protecting a folder on your website from visitors with a username and password (HTTP Authentication) is particularly useful when you want to restrict access to specific files or sections of your website. For example, administration pages, temporary tests, or non-public downloads. This method ensures that only authorized users (who know the username and password) can access them. It is very simple to implement in the DirectAdmin panel.

  1. Access DirectAdmin by typing your domain (domainname.tld:2222) in your browser and log in using your username and password.
  2. Select the main domain you want to secure, then select Password Protected Directories from the Advanced Features category.
  3. Click the “+ADD PROTECTED DIRECTORY” button.
  4. In the path, select the folder you want to protect. If you want to protect your entire site, then select the public_html folder.
    In the Protected Directory Prompt: type what will be displayed to users of your page, e.g., Member’s Area.
    Enter a username and password and click the PROTECT button to complete the process.
    Save the password as it will not be displayed again and click the “VIEW PROTECTED DIRECTORY” button.
  5. Finally, in the View Protected Directory tab, you can see the entry we just created and have the option to edit it.
Was this article helpful?
Please Share Your Feedback
Πώς μπορεί να βελτιωθεί το άρθρο;
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.