Protect a directory with a password

Skip to main content
Du bist hier:
Drucken

Protect a directory with a password

You want to show part of your website only to certain people, for example an internal area or a page under construction? In the hosting administration you protect a directory with a username and password. Anyone who opens the address has to log in first. You remove the protection in the same place.

Step 1: Open the hosting administration

Log in to the hosting administration (Plesk): How to log in

Step 2: Open Password-Protected Directories

Click «Websites & Domains» on the left. For your domain, on the «Dashboard» tab under «Security», you find «Password-Protected Directories».

Password-Protected Directories on the domain dashboard

Step 3: Protect a directory

Click «Add Protected Directory».

List of protected directories

Enter the folder under «Directory name», for example /kunden. A single / protects the whole website. The «Title of the protected area» is shown in the browser’s login window. Then click «Create». If the folder does not exist yet, it is created.

Create Protected Directory form

Step 4: Add a user

Click the directory in the list and then «Add User». Set a username and password and click «Create» at the bottom. You can add several users. As long as no user is entered, nobody can access the directory.

Create a user for the protected directory

Remove the protection

Tick the directory in the list and click «Remove Protection». The folder and its files are kept, only the password prompt is removed.

Directory ticked, Remove Protection button

Good to know

  • The protection also applies to all subfolders of the directory.
  • The entry /plesk-stat belongs to the web statistics of your domain. Leave it in place, otherwise the statistics can be opened without a password.
Related Post