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
- Log in to cPanel.
- In the Files section, click Directory Privacy.
- Navigate to the folder, for example
public_html/internal, and click Edit next to it. - Under Security Settings, tick Password protect this directory, enter a name for the protected area and click Save.
- Click Go Back.
- 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.