How to set password to protect directories using htaccess in Joomla?
In this blog post, we will provide detail instructions on how to protect your Joomla! /administrator/ directory on Apache servers using the htpasswd utility. You can easily adapt these instructions to protect other directories. If you need help finding or creating your .htaccess file, start here.