How to Password Protect Your Website or Certain Directories
Password protecting a directory is useful when setting up staging sites that are not yet open to the public, and when blocking access to specific pages or information.
How To Password Protect Your Website or a Certain Directory Step 1 -Log into cPanel and click on Directory Privacy.
Step 2 - Click on public_html.
Note: If you want to only password protect a subdomain, subfolder or addon
domain (eg: test.yourdomain.net.au or yourdomain.net.au/membersarea/ )
you can use this menu to navigate to that folder)
Step 3 - (1) Tick Password protect this directory (2) Enter a name for your reference (3) click Save.
Step 3 - Add a user and hit Save
Now when someone visits your site, they will get this popup before any content loads:
How To Remove Directory Password Protection Step 1 -Log into cPanel and click on Directory Privacy.
Step 2 - Find the directory that's password protected (it will have a lock on it) and click on the link (not on the lock).
Step 3 - Untick the box next to Password protect this directory then click Save.