- Plesk for Linux
- Plesk for Windows
How to set up a password-protected directory for a domain in Plesk?
Note: In Plesk for Linux, the specified directory will be created if it does not exist. In Plesk for Windows, you can only secure an existing directory.
- In Plesk, find which directory is the Document Root directory for the domain at Domains > example.com > Hosting Settings > Document root.
Additional step for Plesk on Windows Server (if you are on Linux, move to step 3):
Go to Domains > example.com > IIS Settings and make sure that Anonymous authentication is enabled:
Go to Domains > example.com > Password-Protected Directories and click Add Protected Directory.
Specify the directory, located inside Document Root from step 1 ('httpdocs' in this example), that should be secured. In this case, we are restricting an access to the /httpdocs/img folder (example.com/img). Click OK.
Note: Specify "/" to protect the whole website with a password authentication.
Now, click on the directory name.
Click Add a User to create a user that will be used to access the password protected directory. Click OK. Add other users if required.
Open the now protected URL in a web-browser (in this example, example.com/img) and log in using the username and password from step 6.
The command-line instructions are available at:
To learn more about password-protected directories, visit: