skip to Main Content

How to Setup Directory Privacy in cPanel 2025

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

  1. Log in to your cPanel account.

  2. Navigate to Files > Directory Privacy or open File Manager and right-click on the folder you want to protect.

How to Setup Directory Privacy in cPanel

  1. Browse and select the directory you want to secure by clicking on its name.

How to Setup Directory Privacy in cPanel

  1. Click Edit next to the selected folder.

  2. 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”).

How to Setup Directory Privacy in cPanel

 

  1. Click Save.

👤 Create a User for Access

Once the directory is protected, you’ll need to create a user who can log in:

  1. Click the Go Back link after saving.

  2. Under Create User:

    • Enter a username.

    • Choose a password and confirm it in the respective fields.

How to Setup Directory Privacy in cPanel

  1. 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.

Latest Articles
October 27, 2026

Fixing the “cagefs_enter: Unable to fork” Error in cPanel/WHM

Few messages are as disruptive on a shared hosting server as cagefs_enter: Unable to fork. Terminal sessions refuse to open,…

October 26, 2026

Why Is My WordPress Website Slow? 10 Common Causes and Easy Fixes

Why Is My WordPress Website Slow? 10 Causes and Fixes (2026 Guide) Is your WordPress site loading slowly? Discover the…

October 25, 2026

How to Fix 403 Forbidden Error in cPanel!

Have you opened your website only to see a 403 Forbidden error? This error can be frustrating because it prevents…

Subscribe To Our Newsletter

Don't get left out of the loop, make sure you subscribe to our newsletter below so you can be notified of our latest insights, tips, tutorials, sales and more!

Discussion
Back To Top