To create authentication using htaccess do the following:
- Open up console and type
htpasswd -c .htpasswd username to create
or alternatively you can search for
.htpasswd generator online
- Put the newly created
.htpasswd file somewhere hidden.
.htaccess file with the following content:
AuthName "Any title you want"
- Put the
.htaccess file inside the directory you want to password protect
A strong password need to have the combination of letters, numbers, and symbols. Also you need to make it as lengthy as you can.
Problem is, when we have many accounts it can be hard to remember each one, not to mention the must use of combination and symbols all that stuff.
Here’s a trick I use to make unique different strong password for every account:
Create or generate a strong password that is easy for you to remember. Consider making a lengthy and full of combination password, for tutorial purpose lets take
*3X4MpL3_Pa5S# as a password.
Take the first and last letter of the site name. For example we’ll use
sitename.com, so you would have
Combine it with your password and you will have
s*3X4MpL3_Pa5S#e as a password, and if you create an account in another site, e.g:
another.com you will have
a*3X4MpL3_Pa5S#r as a password.
Therefore it would be different for each account in different site. Of course this is only a simple method to create a unique pass, you can be creative and make your own pattern, that way only you will know and understand the pattern.