This document contains information on how to protect your site's folders with a username and password in the Plesk panel, and how to manage the users who can log in or remove protection.
With Password-Protected Directories you can restrict access to a part of your site, for example a private area, a download folder, or a test version. Anyone trying to open that folder, or any file or subfolder inside it, will have to enter a username and password.
Access: log in to the client portal, open your service and click Log in to Plesk. Then go to Websites & Domains → Password-Protected Directories.
Protect a folder
- Click Add Protected Directory.
- Type the folder path, relative to the site folder. For example, to protect
httpdocs/private, type/private. - Optional: type a title, which is the text the visitor will see in the login window, for example "Client Area".
- Click OK.
Important: the folder must exist before protecting it. If it doesn't exist, create it first with the File Manager. After protecting it, add at least one user: if there are none, no one can enter.
Add users
- Click the protected folder and then Add a User.
- Type the username and a secure password.
- Click OK.
Each user has access only to the folder where you created them, not to the rest of the domain's protected folders. If you want a person to enter several, create a user for them in each one.
Change a password or delete a user
- Change the password: click the protected folder, then the user, type the new password and click OK.
- Delete a user: click the protected folder, check the user's box and click Remove. That user stops having access immediately.
Change the login window title
Click the protected folder, then Directory Settings, type the new title and click OK. The folder name does not change.
Remove protection
In the list of Password-Protected Directories, check the folder's box and click Remove Protection. The folder and its files are not deleted: they just become public again.
Useful information
- Use https: enter the folder with
https://yourdomain.com/private, so that the username and password travel encrypted. - Only protects web access: the password is requested from the browser. FTP accounts and File Manager still see the folder normally.
Common issues
- No one can enter the folder: it has no assigned user. Add one.
- The username and password do not work: check that the user is created in that folder and not another, and change the password to rule out errors.
- It won't let me protect the folder: the folder does not exist or the path is misspelled. Check it with the File Manager.
- The browser does not ask for the password again: the browser remembers it during the session. Close it completely or try in a private window.
If you need help, open a ticket from the client portal or consult through the site's online chat.
