Hosting and cPanel

How to protect a folder with a password

Anyone can access subdirectories of public_html (the folder containing all the public files of your hosting account) using a web browser. To restrict access to a specific directory under public_html:

  1. Sign in to cPanel.
  2. In the Security section, click Directory Privacy. A list of subfolders appears.
  3. Click the folder icon to the left of public_html to display its contents and subdirectories.
  4. To select the folder to protect, click its name (not the icon).
  5. On the security settings page, select the Protect this directory with a password checkbox.
  6. In the Protected directory name field, enter the name to assign to the directory, for example "My Protected Folder".
  7. Click Save.
  8. At the bottom of the page, create the username and password that will be used to access this folder.
  9. Click Add/Edit Authorized User.
  10. Open the directory’s address directly in your browser to confirm that it asks for these credentials.

Note: You can only protect folders, not individual files.

For help with a Nuagerie service, see our Support page. For general questions, see our Contact page.