Skip to content
xYnta
Go to websitexynta.com
Search
EN

Password-protecting a directory

Updated on

If you put a password on a directory of your website, the browser asks for a username and a password before anyone can open anything in that directory. Useful for, say, a test version of your website or an admin area. You first protect the directory and then create one or more users.

Web Hosting (DirectAdmin)

Also for Reseller Hosting.

  1. Log in to DirectAdmin via Single Sign-On from Mijn xYnta, or at https://yourdomain.nl:2222.
  2. Under Advanced Features, click Password Protected Directories.
  3. Next to your domain name, click ADD PROTECTED DIRECTORY.
  4. Under Path, click domains/yourdomain.nl/public_html to show the directories of your website, and choose the directory you want to protect.
  5. Under Directory realm, enter the text visitors see in the login window, for example "Protected area", and click PROTECT.
  6. The View Protected Directory screen opens. Under Manage users, enter a Username and a Password and click ADD USER. Repeat this for each user.

Each user has Delete and Change password. To lift the protection, click Remove Protection next to the directory in the list and then CONFIRM.

The View Protected Directory screen in DirectAdmin, with one user
Password Protected Directories › View Protected Directory

WordPress Hosting (Plesk)

  1. Log in to Plesk at https://whs1.srvnl.nl:8443. You can find your server name in How can I find the server name of my hosting package?
  2. Click Websites & Domains and then, under Security, click Password-Protected Directories.
  3. Click Add Protected Directory.
  4. Under Directory name, enter the directory, counted from the root folder of your website (httpdocs), for example /admin. If the directory does not exist yet, Plesk creates it.
  5. Under Title of the protected area, enter the text visitors see in the login window, and click Create.
  6. In the list, click the name of the directory and then Add User.
  7. Enter a Username and a Password (or click Generate) and click Create. Repeat this for each user.

To lift the protection, tick the directory in the list and click Remove Protection.

Video

Password-protecting a directory in DirectAdminYouTube

Related articles