.htpasswd is a plain text file used to store usernames and passwords for basic authentication on an Apache HTTP Server. Though the name can be anything because it is defined in the .htaccess file, the convention is to use .htpasswd with a dot (.) because most Unix-like operating systems consider any file that begins with dot to be hidden. The shell command “htpasswd” is used to maintain the contents of the file including properly encoding the password.
The .htpasswd file is commonly used to protect the entire directory it is placed in, as well as particular files.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.