Password-protecting a directory (Directory Privacy) Print

  • cPanel, Passwortschutz, Verzeichnis
  • 0

With Directory Privacy you protect a folder of your website with a username and password, for example a test area or an internal download folder. When it is accessed, the browser asks for the credentials.

Protect a directory

  1. Log in to cPanel.
  2. In the Files section, click Directory Privacy.
  3. Navigate to the folder, for example public_html/internal, and click Edit next to it.
  4. Under Security Settings, tick Password protect this directory, enter a name for the protected area and click Save.
  5. Click Go Back.
  6. Under Create User, enter a username and password (or use the Password Generator) and click Save.

To test it, open https://yourdomain.ch/internal. The browser asks for a username and password.

Note: The protection also applies to all subfolders. Do not protect the whole public_html folder, otherwise your entire website will only be reachable with a password.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution