How to password protect a folder in cPanel
When such a folder is opened, the browser asks for a login and password. Use it for admin areas, staging copies and service pages.
- Open "Directory Privacy" (group "Files").
- Go into the site folder, for example
public_html(click its name). - Click "Edit" next to the folder you need.

- Check "Password protect this directory.".
- Enter a name - visitors see it in the login window.
- Click "Save".

Click "Back" and open the folder again. The "Create User" block appears.
- Enter a username and password.
- Click "Save".

The user appears under "Authorized Users". You can add several users.

Protection covers all subfolders. To remove it, clear "Password protect this directory." and save.