Steps
- Open Directory Privacy
In cPanel, go to Files → Directory Privacy.
- Choose the folder
Browse to the folder you want to protect and click Edit.
- Turn on protection
Tick Password protect this directory, give it a name, and click Save.
- Create a user
Under Create User, enter a username and password, then click Save.
Tips
- This is useful for a staging site or a private area you’re still building.