» Tukisivuston etusivulle
Protecting directories with a password
With directory password protection, you can easily prevent public access to a specific directory in your website space by defining a username and password required for access to the directory. The function is very handy when you want to implement, for example, an extranet page intended for a limited customer group (e.g., www.yourdomain.com/extranet) or even prevent your website from being publicly visible during website construction.

Password protection of the selected directory can be easily done directly from the Plesk control panel. If you have multiple web hosting subscriptions with the same Plesk account, make sure before starting the installation that you have selected the web hosting to which the application is to be installed from the 'Subscription' dropdown menu in the upper right corner of the control panel.



At the bottom of the opening view, you will see at least one protected directory named /plesk-stat - this represents the password protection of the WWW statistics system delivered as standard with web hosting (e.g., www.yourdomain.com/webstat/) - so the password protection of your website's user statistics page is also implemented with this same function:



Press 'Add Protected Directory' to protect the directory you want. After this, you can define the directory name (by default, the slash / in the field means the root directory, in which case the entire site is protected, for example, during construction). If you want to protect only a subdirectory, enter the subdirectory name with a slash (e.g., /extranet). If desired, you can also enter a protected area title, which is displayed in the browser's password prompt dialog window (this can be free-form text, e.g., "Enter password").



Press 'OK' and the directory is protected (and created if the directory doesn't exist). After this, you return to the previous view. Next, click on the directory name and you can define a username and password for it by clicking 'Add a User':



Enter the desired username and password in the opening view, which are used to access the directory, and press 'OK'.



The username is created and you receive a notification about it. Test access to the directory by navigating to it with your browser and entering the username and password you defined when the browser asks for them.

Tip! You can also add multiple usernames to the same directory if desired, so if necessary, you can also manage access for multiple different users or user groups to the directory you specify with this control panel function, which can be a useful feature for an organization's extranet pages, for example

Removing password protection and usernames

When necessary, you can also remove users or even the entire password protection as follows:

  • To remove an individual user, select 'Password-Protected Directories' from the Plesk control panel -> (click on the protected directory name) -> check the desired user and click 'Remove'.

  • If you want to remove the entire password protection, select 'Password-Protected Directories' from the Plesk control panel -> check the desired directory and click 'Remove Protection'. (The tool does not delete the directory or its contents, only the password protection).


Hostaan Support