Plesk allows you to password-protect specific directories on your website. When a directory is protected, visitors must enter a username and password to access its contents. This guide shows you how to add and remove password protection for directories in Plesk.
How to add password protection to a directory
-
Step 1: Navigate to password-protected directories
Login to Plesk. In the left sidebar menu, click on 'Website & Domains', then click on the 'Password-Protected Directories' icon.
-
Step 2: Create a new protected directory
Under the 'Tools' option, click on 'Add Protected Directory'.
-
Step 3: Specify the directory name
Under 'Settings', in the text box 'Directory Name', enter the name of the directory you wish to protect. Do not include 'httpdocs' in the directory name — enter only the directory name itself.
Optionally, in the text box 'Title of the protected area', you can type a descriptive name for the protected directory.
Click on 'OK'.
-
Step 4: Add a user
Under the 'Protected Directories' section, click on the name of the directory you just created. Under the option 'Tools', click on 'Add a User'.
-
Step 5: Set username and password
Under the option 'Protected directory user', in the text box 'Username', enter the name of the user.
In the text boxes 'New Password' and 'Confirm Password', enter the user's password.
Click on 'OK'.
Password protection will now be activated for that directory. Note that all subdirectories under the protected directory are automatically protected as well.
How to remove password protection from a directory
-
Step 1: Locate the protected directory
Login to Plesk and navigate to the 'Password-Protected Directories' section. Look for the directory from which you want to remove password protection.
-
Step 2: Select and remove protection
Click on the checkbox on the left side of the directory name, then click on 'Remove Protection'.
-
Step 3: Confirm removal
On the 'Removal Confirmation' page, click on the 'Confirm Removal' check box, then click on 'OK'.
Plesk will remove the password protection from that directory.