How to Password protect a directory in cpanel

  1. Click the Directory Privacy icon.
    Screenshot of the Directory Privacy icon in cPanel
  2. Select the directory you want to password protect by clicking its name or click the folder icon to see directories within the main directories.
    Screenshot of Directory Privacy list in cPanel
  3. Check the Password Protect box, then create a name for the directory to be protected (this does not need to be the same as the directory name), and click Save.
    Screenshot of the location to enter the name for a private directory in cPanel
    IMPORTANT: When a user attempts to access the protected directory through a browser, the site will prompt them to enter a username and password. The name that you choose for the protected directory will also display.
  4. You will now need to create a username and password to be able to access the directory. On the same page scroll down to the Create User section.
  5. Create a username and password and reenter password in the Create User section.Screenshot of user creation for private directory in cPanel
  6. Click Save to create the new user.NOTE: The protected directory now has one user who has access to it. Repeat this process for each additional user you want to grant access for.