How to Password Protect a Web Page

Intermediate 10 min 15 steps 22229 views Rating: 4.3/5 Published: 2026-06-09

Create a text file called .htpasswd.. Create an encrypted password at http://www.htaccesstools.com/htpasswd-generator.. Paste the copied text into the file.

Start Playback
C
Author

Steps

1

Create a text file called .htpasswd.

Step 1

Create a text file called .htpasswd.

2

Create an encrypted password at http://www.htaccesstools.com/htpasswd-generator.

Step 2

Create an encrypted password at http://www.htaccesstools.com/htpasswd-generator.

3

Paste the copied text into the file.

Step 3

Paste the copied text into the file.

4

Save and exit the file.

Step 4

Save and exit the file.

5

Create a new text file called .htaccess.

Step 5

Create a new text file called .htaccess.

6

Paste the code into the file.

Step 6

Paste the code into the file.

7

Save and exit the file.

Step 7

Save and exit the file.

8

Test it out in a web browser.

Step 8

Test it out in a web browser.

9

Log in to your website's administrative panel.

Step 9

Log in to your website's administrative panel.

10

Go to the page or area you want to protect.

Step 10

Go to the page or area you want to protect.

11

Go to the Settings area for the selected page.

Step 11

Go to the Settings area for the selected page.

12

Enable the password-protection feature for the page.

Step 12

Enable the password-protection feature for the page.

13

Save your changes and test out the password.

Step 13

Save your changes and test out the password.

14

Test the password protection.

Step 14

Test the password protection.

15

Contact your web host for more information.

Step 15

Contact your web host for more information.

View as Slideshow

Rate This Guide

★ ★ ★ ★ ☆ 4.3/5
3

Comments (0)

No comments yet. Be the first to share your thoughts!