.htpasswd Generator

Active / Live

.htpasswd Generator

Password-protect a staging site on Apache in two minutes

Type a username and password and you get a bcrypt (\(2y\)) .htpasswd line plus the matching .htaccess block to paste in. The page covers the parts that usually break:

  • AuthUserFile needs an absolute server path.
  • Keep the .htpasswd file outside the web root.
  • Use Basic auth only over HTTPS.
  • For staging, a password wall is a better choice than robots.txt.

Free, with no account, and the password isn't stored. One of 33 tools on Web Tool Bench, made by Sanan.