.htpasswd

Updated: 10/11/2017 by Computer Hope

The .htpasswd file stores usernames and passwords, used 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 appears 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