Why Would You Want To Lock Your Website?
The primary reason to lock your website is to prevent it from being crawled and indexed by search engines. Since they cannot get through the verification, the search engine robots cannot crawl and index your site. Furthermore, if anyone happens to stumble onto your website they will not be able to access anything.
The reasons why you do not want to your website to be crawled are numerous including: it’s not optimized for the keywords you want yet, it has security vulnerabilities, or maybe it’s just not complete and ready to be seen by the public.
The Login Screen
On Google Chrome a login screen will appear that looks like this:
If you click the cancel button, you will get a 401 error. Also the message “Your connection to this site is not private” can be fixed by purchasing an SSL certificate.
Video: How To Lock Your Website