ravi
answered Nov 30 '-1 00:00
Login to cPanel or your hosting account dashboard
Click on the Directory Privacy button (It may also say Password Protect Directory)
directory privacy
You will then get a list of directories available on the server.
list of directories
Click on the name of whatever directory your site is in. (Often this is public_html. For me it’s staging.domain.com.)
This will bring you to the Joomla file structure of your site. We want to password protect /administrator.
Click the Edit button to protect /administrator