Help center

How to Password-Protect a Directory

Updated November 5, 2026

Use Directory Privacy in cPanel to require a username and password before visitors can access a folder on your website. You can protect a folder and manage the users who are allowed to access it.

Protect a directory

  1. Sign in to cPanel and open Directory Privacy.
  2. Browse the folders to find the one you want to protect, then select its name. Check that the directory shown is the correct one.
  3. Enable the option to password-protect the directory. Enter a name to identify the protected directory, then save your changes.
  4. Return to the directory’s settings and create a username and password for an authorized user. Save the user. Repeat to add more users.

Manage access

Return to Directory Privacy whenever you need to add users, change a user’s password, or remove a user. A lock icon next to a folder indicates that it is password-protected.

If something doesn’t work

Check that you selected the intended directory and created an authorized user. If you still can’t set up access, open a ticket with us.

Still stuck?

Sign in and open a ticket, and we'll help.

Sign in and open a ticket