Blackhawk MSP
Back to blog
How to Password Protect a Directory in cPanel
Security

How to Password Protect a Directory in cPanel

June 21, 2026

Overview: How to Password Protect a Directory in cPanel

This guide explains How to Password Protect a Directory in cPanel step‑by‑step and why it matters for security, uptime, and performance. It’s written for small and medium businesses that rely on Blackhawk MSP for proactive, managed IT support in the Bay Area and beyond.

  • ✅ Clear, actionable steps
  • ✅ Best‑practice notes from our MSP engineers
  • ✅ Links to related services and help
Tip: If you’re short on time, contact us — we’ll handle this for you and verify everything is working.

You can lock a directory with a password using the cPanel's Directory Privacy.


1. Log in to your cPanel account.


2. In the Files section, click on Directory Privacy.
How to Password Protect a Directory in cPanel

3. Click on the directory to open it.
How to Password Protect a Directory in cPanel

4. Click on the Edit, showing next to the directory you want to protect.
How to Password Protect a Directory in cPanel

5. Under Security Settings, check-mark Password protect this directory. Then click on Save.
How to Password Protect a Directory in cPanel

6. Now click on Go back.
How to Password Protect a Directory in cPanel


7. Scroll down the page. Under Create User, fill in the username and password fields or use the Password Generator option to generate a new random password and copy it to Notepad. Click on Save.
How to Password Protect a Directory in cPanel


If you try to open the password-protected directory in your browser via the URL www.example.com/myfolder, your browser prompts for credentials.
How to Password Protect a Directory in cPanel

You have password protected a directory in cPanel to add an extra layer of security to your website content.

Video tutorial temporarily unavailable while we refresh links. If you need more help, please call us at 1-925-218-4000.


Need help? Blackhawk MSP can do this for you, verify success, and document the change. Call 1‑925‑218‑4000 or open a ticket.

Related posts

© 2026 Blackhawk MSP · Blog