In some cases, you might want to lock your website. For example, when your website is under construction or it should be available to selected people only. 

To password protect your website, you can go to Settings > General > Website and check the box next to Password Protect the Website. Then you can set the password in the field, Site Password, underneath the checkbox.