Create a password in the .htaccess file for private access to the site.
File contents .htaccess:
AuthName “Protected Zone”
# Deny browser access to the .htpasswd file
deny from all
For security reasons, the file htpasswd place on the directory above the site (usually this public_html, therefore, put on a higher level).
Inside the file .htpasswd there should be passwords in the following form:
UserName1: $ apr1 $ dfkmDs $ kgsg83mdgskgjDms3mKD
where after the colon is the password encrypted in MD5… Other formats are also possible, such as crypt or SHA.