How To Password Protect A Website
Do you need to password protect your website? If you are working on a website you need others to see, but don't want the entire world to see, protecting it with a password can be a wonderful option to enhance security. Sure, there are software programs that you can purchase to password protect your site, but why spend extra money when you can easily add a password yourself?
In order to password protect a website, you will need:
-
Basic HTML knowledge
-
Consider using a side server tool. Some of the more popular protection tools are .htaccess and .htpasswd files, php pages, or perl scripts. You want to make sure your page is as secure as possible. You will need to enter the name of your website behind the opening tag. Follow with the closing tags
-
To create a password file you must open a basic text editing program. You must type in the opening tags: <html><head>. You cam then type the title of your website and close with title with the following tag: <title>Protected Page: Please enter password</title>.
-
Type the following command to notify the browser a script will begin: <script language="Javascript">. Make sure you follow the commands exactly. A slight html error will keep the password from working.
-
Continue by pressing the “enter” key and typing in //prompt. Press the “enter” key again. Next enter your password by typing: var password = prompt("Enter in the password""");. Type the following and insert the name of your webpage where is says "correct.html": { location = "correct.html"}.
-
Close the scripted section. To close the section of the page, you must type in the following: </head>. Click save.















