JSOPanel Get started
Help Center › Website Owners › Password-protecting a folder

Password-protecting a folder

Require a username and password before anyone can open a particular folder on your site.

Directory Privacy puts a username-and-password prompt in front of one folder on a website - the browser's own built-in sign-in box, not a page you have to build. It's for plain files you want to keep private (documents, downloads, a folder of images or assets), not for a PHP application's own admin area, which already has to protect itself the same way it always has.

Protecting a folder

  1. Click Directory Privacy under Files in the sidebar.
  2. Choose the website the folder belongs to.
  3. Type the folder's path, for example /private or /private/docs. The folder has to already exist under that site's files - create it first with the File Manager or over FTP if it isn't there yet.
  4. Optionally, type a prompt shown in the sign-in box, otherwise visitors see a plain default.
  5. Click Protect this folder.

Adding who can open it

A newly protected folder starts with no users at all - nobody, including you, can open it until at least one is added. Under the folder's own card, type a username and a password (at least 4 characters) and click Add / change user. Add as many separate logins as you need; typing the same username again changes that person's password without affecting anyone else's.

Click Remove next to a username to take away their access, or Stop protecting to remove the password requirement from the whole folder. Either way, the files themselves are never touched - only who has to sign in to see them.

Note: adding or removing a single user takes effect immediately. Protecting or unprotecting a whole folder updates the website's own configuration, so it takes a moment longer - the rest of the site keeps serving visitors normally the entire time.