Password-protecting a folder
Keep a staging site or private folder away from the public.
- In cPanel, open Directory Privacy.
- Click the folder (for example
public_html/staging) and choose Edit. - Tick Password protect this directory, give it a name and save.
- Create a username and password for it.
Visitors now need that username and password to open anything in the folder.