Password-protecting a folder in Plesk

Password-Protected Directories closes a site folder with a username and password: when the URL is opened, the browser shows a login prompt. Use it to protect an admin area, a staging section or service files.

Where to find it: the domain card, the Dashboard tab, the Security group, Password-Protected Directories.

List of protected directories
List of protected directories

How to protect a folder

  1. Click Add Protected Directory.
  2. In Directory name, enter the path from the site root, for example /admin.
  3. In Title of the protected area, enter the caption the visitor sees in the login prompt.
  4. Click Create.
  5. Open the new directory in the list and add a user with a name and password. Without a user, nobody can log in.
Create Protected Directory window
Create Protected Directory window

With this kind of login, the username and password travel almost in plain text. Enable an SSL certificate on the site and open the protected folder only via https://.

How to remove protection

Select the directory in the list and click Remove Protection. The folder and its files remain.

The list already contains /plesk-stat (Domain statistics) — this is the site's protected statistics. Do not remove its protection.

Common mistakes

  • Protection does not trigger — the path is not relative to the site root or has a typo.
  • The password is rejected — check the keyboard layout and letter case; set the user's password again if needed.
  • Site scripts that access the folder stopped working after protection — protect only what people open.
Questions and answers
Yes, enter / in Directory name. But visitors and search engine bots will also see the login prompt.
Add a separate user for each person who needs access — that way you can revoke access one by one.