TrustServers Knowledge Base
Tip: Start typing to get instant search results.
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.
- Access DirectAdmin by typing your domain (domainname.tld:2222) in your browser and log in using your username and password.
![]()
- Select the main domain you want to secure, then select Password Protected Directories from the Advanced Features category.
![]()
- Click the “+ADD PROTECTED DIRECTORY” button.
![]()
- 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.![]()
- Finally, in the View Protected Directory tab, you can see the entry we just created and have the option to edit it.
![]()




