How to Password Protect a Hugo Website
Hugo is a static website generator that ships without a database which adds security, simplicity, and speed. But, no database means that Hugo doesn’t have a built-in solution for password protection or user management.
Luckily, your web server does have the ability to perform basic user management. This is a good solution for making a Hugo site private.
I use this very basic .htaccess configuration to prompt a user for credentials before they can access my site.