---
title: "How to Password Protect a Folder of Your Website on Plesk"
description: "Password protect a folder or your whole website on Winheberg Plesk web hosting, protected directory, allowed users, HTTPS and WordPress precautions."
category: cloud
subcategory: hebergement-web
icon: tabler:file-text
date: 2026-11-02
author: Winheberg
slug: "password-protect-folder-plesk"
order: 151
image: /statics/images/docs/en/hebergement-web/password-protect-folder-plesk.webp
tags: [Security, Password, Plesk, Access, Web Hosting]
keywords: [password protect folder, protected directory, htaccess password, site under construction, restricted access, plesk]
link_fr: "/docs/hebergement-web/dossier-protege-mot-passe-plesk"
---

## Context

A website under construction, a test version, a folder of private documents or an administration area do not need to be visible to everyone. Password protecting a folder asks for a login from anyone who tries to open it, before the page even shows.

On your [Winheberg web hosting](https://winheberg.com/en/cloud/web-hosting), Plesk sets up this protection without touching your website code. The browser shows a login window, and only the users you created can get in.

This guide covers protecting a folder, creating the allowed users and the precautions to take.

> [!NOTE]
> The Winheberg Plesk panel is displayed in French. Menu, field and button names are quoted below exactly as they appear on screen, followed by their English meaning.

## Prerequisites

- A Winheberg web hosting plan with access to the Plesk panel
- The path of the folder to protect, for instance `/private` for `example.com/private`

> [!IMPORTANT]
> The browser sends the login and password with every page. Without HTTPS, they travel in clear text. First install the free certificate of your domain with our guide [How to Generate a Let's Encrypt SSL Certificate for Your Website](https://winheberg.com/en/docs/hebergement-web/lets-encrypt-ssl-certificate-plesk)

## 1. Open the protected directories

Open your domain from **Sites Web & Domaines** (*Websites & Domains*). In the **Tableau de bord** (*Dashboard*), **Sécurité** (*Security*) section, click **Répertoires protégés par un mot de passe** (*Password-Protected Directories*).

<img src="/statics/images/docs/en/hebergement-web/password-protect-folder-plesk-1793616261325-5590309a0fe75c7b554cde48.webp" alt="List of password-protected directories in Plesk" width="800" />

The list already contains `/plesk-stat`, the folder of your website statistics, protected by default. Leave it as it is.

## 2. Protect a folder

Click **Ajouter un répertoire protégé** (*Add Protected Directory*).

<img src="/statics/images/docs/en/hebergement-web/password-protect-folder-plesk-1793616261618-80aef24090b52c9a282ec3fc.webp" alt="Create a protected directory window in Plesk" width="630" />

::MdTable{caption="Window fields" variant="info" striped}
| Field | What to enter |
|---|---|
| Nom du répertoire (*Directory name*) | The folder path from the website root, for instance `/private`, or `/` to protect the whole website |
| Titre de la zone protégée (*Protected area title*) | A label to find your way, which some browsers show in the login window |
::

Click **Créer** (*Create*). The folder shows in the list, but nobody can get in yet.

## 3. Add the allowed users

In the list, click the name of the protected folder, then **Ajouter un utilisateur** (*Add User*).

<img src="/statics/images/docs/en/hebergement-web/password-protect-folder-plesk-1793616261903-29c9637d6200c92d9adb92bc.webp" alt="Create a user for the protected directory window in Plesk" width="630" />

Enter a **Nom d'utilisateur** (*User name*), click **Générer** (*Generate*) to get a strong password and write it down, then click **Créer**. Repeat for each person, each with their own login.

## 4. Test the protection

Open the folder address in a private browsing window, for instance `https://example.com/private`. The browser should ask for a login and password before showing anything.

To remove the protection, tick the folder in the list, then click **Supprimer la protection** (*Remove Protection*). The folder and its content stay in place.

## Troubleshooting

### ❌ The login window keeps coming back

The server rejects the credentials entered.

- Check the user name, it is case sensitive
- Set a new password for this user from the folder user list
- Close all browser windows, it sometimes keeps an old password in memory

### ❌ Part of the WordPress website stops working

The `/wp-admin` folder is protected, while some functions of the public website go through it.

- Protect the whole website instead while it is under construction, with `/` as directory name
- To secure the administration of a live website, prefer strong passwords and the WP Toolkit security measures

## Best practices

- Protect the whole website while it is under construction, then remove the protection when it goes live
- Create one user per person, so you can remove an access without changing the others
- Delete the users who no longer need access
- Do not rely on this protection for highly sensitive data, keep it outside your public webspace instead

## Need help?

If the protection does not apply or blocks part of your website, open a ticket with our support from your [client area](https://billing.winheberg.com), **Technical** department, filling in the **Related Product** field with the web hosting concerned. Mention the path of the protected folder.

Your private pages stay private, without a line of code 🔒

