How to Password-Protect a Directory in cPanel

Password-protect a folder in cPanel when you want a simple login before visitors can see that part of the site (staging folders, private downloads, and similar).

Protect a directory

  1. Log in to cPanel from clients.cidhosting.net.
  2. Files → Directory Privacy (sometimes labelled Password Protect Directories).
  3. Open the folder you want to protect (for example a subfolder under public_html).
  4. Tick Password protect this directory, enter a name for the protected area, and save.
  5. Create a user: username + password → Save / add user.

Tip: This is browser basic-auth for a folder — not a replacement for strong WordPress or mailbox logins, or two-factor on the client area.

Questions? clients.cidhosting.net/submitticket.php.

  • Password Protect Directory
  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

How to Backup a Database in cPanel

Download a copy of a MySQL database from cPanel when you want your own backup before a big...

How to Create an Email Account in cPanel

You can create mailboxes for your domain (for example, [email protected]) yourself in...

How to Update an Email Account in cPanel

Update mailbox settings in cPanel — quota, password, or related options — without deleting the...

How to Delete an Email Account in cPanel

Delete a mailbox in cPanel when it is no longer needed. This removes the address and the mail...

How to Enable Spam Filters in cPanel

Reduce junk mail with SpamAssassin / spam filters in cPanel. Thresholds and labels vary by theme...