.htpasswd

Updated: 10/11/2017 by Computer Hope

The .htpasswd file is used to store usernames and passwords, used in conjunction with the .htaccess file. Below is a basic example of how to create a .htpasswd file.

htpasswd -c .htpasswd joe

The above command would create a file named .htpasswd with the username joe. Once created, a prompt to enter the password for joe will appear twice.

The .htpasswd or the ht password file must be correctly attributed to be accessed; usually set to a group with read access. *NIX users should chmod 644 the file.

.htaccess, Web design terms