cPanel provides a simple way to password-protect specific directories on your website. This is useful for restricting access to sensitive content or private sections of your site.
Follow these step-by-step instructions to enable Directory Privacy in cPanel:
✅ Step-by-Step Instructions
-
Log in to your cPanel account.
-
Navigate to Files > Directory Privacy or open File Manager and right-click on the folder you want to protect.

-
Browse and select the directory you want to secure by clicking on its name.
![]()
-
Click Edit next to the selected folder.
-
Under Security Settings:
-
Check the box that says “Password protect this directory”.
-
In the “Enter a name for the protected directory” field, provide a label (e.g., “Admin Panel”).
-

-
Click Save.
👤 Create a User for Access
Once the directory is protected, you’ll need to create a user who can log in:
-
Click the Go Back link after saving.
-
Under Create User:
-
Enter a username.
-
Choose a password and confirm it in the respective fields.
-

-
Click Save to finalize user creation.
✅ You’re Done!
Your selected directory is now protected. Anyone trying to access it via the browser will be prompted to enter the username and password you
⚠️ Note:
This method adds a basic level of protection. It should not replace proper security practices such as SSL, strong passwords, and secure coding standards for web applications.
