Protecting specific folders on your website is an **essential security measure**, especially for areas containing sensitive files, client data, or staging content. This guide outlines the process for password protecting a directory (folder) on your web hosting account using cPanel's **Directory Privacy** feature.
How Directory Protection Works:
When a directory is password-protected, a user who tries to access it via a web browser will be prompted to enter a valid username and password before they can view the contents.
Directory Protection Steps:
- Log into your **cPanel dashboard**.
- In the **Files** section, click the **Directory Privacy** icon.
- Select the directory you want to protect by clicking its **name**.
- Under **Security Settings**, check the box for **Password protect this directory**.
- Enter a descriptive name for the protected directory and click **Save**.
- Next, scroll down to the **Create User** section and enter a **Username** and **Password** for a user who will be allowed access.
- Click **Add/modify authorized user**.
You can create multiple authorized users to grant access to different team members or clients. This is a simple, effective layer of security!