NEW CASE
Antana

We create digital solutions that work for businesses


Give us a call +38 (066) 35-14-529

Let's take the first step towards your website — write to us

Close
Tools

.htpasswd Generator

Login and password for Apache .htpasswd.

Why password-protect a section

The simplest server-level protection. It works before the request even reaches the site.

A site in development So an unfinished version stays out of search and away from competitors. Safer than noindex.
A staging subdomain A copy for testing. Unprotected it gets indexed as a duplicate and hurts your rankings.
Utility sections Statistics, admin panels, temporary files. A second layer on top of the normal login.
Blocking brute force Bots never reach the login form; the server rejects them before your code runs.

How to set it up

1 Create the password file Save the generated line into a .htpasswd file. The password is stored hashed.
2 Store it outside the web root It must sit where a browser cannot reach it, or it will simply be downloaded.
3 Add the rule to .htaccess A few lines in the folder you are protecting. Give the full path to the password file.
4 Test in another browser Your current one may already remember the login. A private window shows what an outsider sees.

.htpasswd generator for Apache

The simplest way to password-protect a folder or a staging site is Apache HTTP Basic authentication. Enter a login and password, and the generator creates a ready line for the .htpasswd file with the password hashed using bcrypt — a modern, strong algorithm. The password is never stored in plain text on the server.

How to apply: save the line to a .htpasswd file outside the public folder, and in the .htaccess of the target directory add AuthType Basic, AuthName, AuthUserFile with the file path and Require valid-user. The browser asks for the password before the page even loads. Perfect for protecting admin panels, dev versions and private sections.

FAQ

What is .htpasswd?
The .htpasswd file stores logins and encrypted passwords for Apache HTTP Basic authentication. With it you can password-protect a folder or site.
How to password-protect a folder?
Create a line with this generator, save it to a .htpasswd file, and in .htaccess set AuthType Basic and the path to that file via AuthUserFile.
How secure is it?
The password is stored encrypted (bcrypt). For reliable protection use it together with HTTPS so the password is not sent in the clear.
Where is it used?
To protect admin panels, staging site versions, closed sections. The browser asks for the password before the page even loads.
Telegram Viber Call us