How to password protect a folder with Directory Privacy

Directory Privacy lets you put a password on a folder of your website, so visitors must log in before they can see what is inside. It is useful for private documents, a staging site, or a members-only page.

Steps

If your cPanel uses the Jupiter theme

  1. Log in to cPanel and open Files > Directory Privacy.
  2. Click the folder you want to protect. To open a subfolder, click its name.
  3. Click Edit next to the folder.
  4. Tick Password protect this directory and enter a name for it. This name appears in the login box.
  5. Click Save, then Go Back.
  6. Under Create User, enter a username and password and click Save.
  7. Visit the folder's address in a private browser window to test.

If your cPanel uses the Meridian theme

  1. Log in to cPanel.
  2. cPanel's official Meridian guides do not document Directory Privacy in the Files or Security hubs. Click Search... in the header, or press Ctrl+K (Cmd+K on a Mac), and search for Directory Privacy. Open the matching result. If it does not appear, contact Barrett IT Support.
  3. If the tool opens, click the folder you want to protect, then click Edit next to it.
  4. Tick Password protect this directory, enter a name for the login box, and save.
  5. Create at least one user with a username and password, then save. Visit the folder's address in a private browser window to test.
  6. If you cannot find the tool, contact Barrett IT Support.

When to use Directory Privacy

This is a good fit for a folder of private documents you want to share with a handful of customers, or a test copy of a website that you do not want search engines or the public to find. It is not designed for protecting high-value information, so for anything confidential, ask us about better options.

Tips and troubleshooting

  • You must create at least one user, or no one can open the folder.
  • Subfolders inherit the protection of their parent folder.
  • If you cannot create a user, change the folder's permissions to 0700 in File Manager, then try again.
  • This only protects web visits. It does not protect files accessed over FTP or File Manager.
  • Do not rely on this alone for sensitive data such as customer records. Passwords are not as strong as encryption.
  • To remove protection, untick Password protect this directory and click Save.

Need help? Contact Barrett IT Support at support@barrettit.com or call 888.374.4632.

  • 0 Los usuarios encontraron esto útil
¿Le ha resultado útil esta respuesta?

Artículos relacionados

How to check your SSL certificate and secure your website

An SSL certificate encrypts the connection between your website and visitors and makes the...

How to fix "Not secure" warnings and mixed content

Sometimes a website has a valid SSL certificate but the browser still says the site is not secure...

How to change your cPanel password

A strong, unique cPanel password protects your whole hosting account. Change it regularly, and...

How to set up two-factor authentication (2FA) for cPanel and WHM

This article is for people who log in to a Barrett IT hosting account in cPanel, and for reseller...

How to block an IP address from your website

If you see unwanted visitors, such as someone repeatedly trying to break in or scraping your...