Protecting directory privacy in cPanel
Directory Privacy (also known as Password Protect Directories) allows you to restrict access to certain folders on your website. Visitors must enter a valid username and password to view the contents of the protected directory. This is useful for securing private content, admin areas, or membership sections.
Why Use Directory Privacy?
Section titled “Why Use Directory Privacy?”- Prevent unauthorized access to sensitive files or folders.
- Secure admin panels, staging sites, or client‑only areas.
- Add an extra layer of protection beyond standard authentication.
Steps to Protect a Directory
Section titled “Steps to Protect a Directory”-
Log in to cPanel.
-
On the Tools page → Files section, click Directory Privacy.
-
Navigate to the folder you want to protect.
- Use the file tree to locate the directory.
-
Click the Edit icon next to the directory.
-
Check the box:
Password protect this directory -
Enter a name for the protected directory (this is displayed on the login prompt).
-
Click Save.
Creating a User for the Directory
Section titled “Creating a User for the Directory”- After saving, scroll to Create User.
- Enter a username and password.
- Click Save.
- The user can now log in to access the protected directory.