Use this htpasswd generator to create passwords for htpasswd files. Create a htaccess string using your username and password. Simply fill in the form below.
A '.htpasswd' file is a file which will protect your directory on a web server. This will only work on apache. Simply create a '.htpasswd' file in the directory you wish to secure, and copy the htpasswd string you generated. Htpasswd files are used to create and update password protected directories on your web server. This is also known as 'basic authentication'.
Simply copy the htpasswd string into a '.htpasswd' file. If you require multiple username and passwords, just copy one per line.
The second step is to enable this password by adding the following to a '.htaccess' file within the directory you wish to secure.
AuthType Basic AuthName "Type whatever you want here. Note: Members of the public can view it :-)" AuthUserFile /var/www/.htpasswd # edit this to the location of your .htpasswd file Require valid-user