How to Password Protect a Directory to Prevent Public Access
1-Log in to your Dashboard
◦ Go to Dashboard
◦ Select Services then click on active on your hosting service.
◦ Click login to cPanel to access your cPanel dashboard.

2- Password Protect the Folder (Directory Privacy)
- In cPanel, scroll to the Files section ---> Click Directory Privacy.

- You’ll see a list of folders on your account.
- Click Edit next to the folder you want to protect ---> Check the box “Password protect this directory”.

- Enter a name/label for the protected directory (this is what users will see in the login prompt) ---> Click Save to apply password protection.

3- Create a User for the Protected Directory
- After saving, click Back to return to the same directory screen (it will now show user fields).
- In Username, enter the username that will be used to log in.
- In New Password, enter a strong password.
----> You can click Password Generator to generate a very strong random password.

- Confirm the password in Confirm Password.
- Click Save to create the user.
4- Adjust Directory Permissions (Optional but Recommended)
To make sure your directory permissions are secure:
- In cPanel, go back to the main page and click File Manager under Files.

- Navigate to the directory you protected -----> Right-click the folder and select Change Permissions.

- Set the permissions to 744 (Owner: read/write/execute – Group: read – Public: read).

- Click Change Permissions or OK to confirm.