Welcome back to KDJ Guru. This post is about protecting your website using .htaccess password. However, we can use .htacess to protect access to directories. Sometimes, some files can be private and some of them can be accessed by a set of group. Anyway, we can make each file in a directory with password protection.
first, we need to make a file with the name ‘.htpwd’ in you directory with the following usernames and passwords. However, you have to make your own and replace them. Click here to make your own usernames and passwords.
Then paste the following code into your .htaccess file. If you don’t have a .htaccess file, you have to make it first.
[code]AuthName “KDJ Guru Admin”
Then you must replace the bolded text with your file path.
I hope, this tutorial will surely help you to protect your website with a password. Just remember to encrypt your passwords with the above generator. Have a nice day!