How to Create a Password-Protected Web Site

How to Create a Password-Protected Web Site thumbnail
Create a Password-Protected Web Site

A password-protected website means that only you and users you grant permission to can access it. There are services that will help you add password protection to your wesite either for free or for a fee. All you have to do is sign up and add some code to your homepage. Follow these steps to find out how.

Instructions

    • 1

      Join a website that offers this service. Some are less secure and may not offer the exact protection you need. Others are more secure and may require a fee.

    • 2

      That website you joined will give you an HTML code to enter into your website. This may vary based on the program.

    • 3

      Look for a line in the script that reads "form.id.value=='userID.'" Change "userID" to whatever username you want.

    • 4

      Now look for a line in the script that reads "form.pass.value=='password.'" Change "password" to the one you want.

    • 5

      Now look for a line that reads "location='page2.html.'" This is the URL of the page that the person will be directed to once they enter the correct password. You may have to edit the path accordingly. If you're not sure, just put the complete URL of the page here.

    • 6

      The next step is optional. Look for a line that reads "alert('Invalid Password')." You can change "Invalid Password" to whatever message you want. For example, you can make it say, "The password you entered is incorrect. Please try again."

    • 7

      You can also do the same to the user Invalid ID section. Look for the line "alert('Invalid UserID')." Change "Invalid UserID" to whatever message you want to display when the username is incorrect.

    • 8

      That's it. You're finished!

Tips & Warnings

  • Try free services.

  • Try multiple services to see which one is best for you.

  • You can direct different people to different webpages. They won't realize other pages exist unless you grant them access.

  • Make sure the code source cannot be viewed. If it can, someone will see the password

  • Make sure the software you use is compatible with your OS.

Related Searches:

Comments

  • Milen Kirov Oct 28, 2010
    Nice article. :) Thanks
  • jack978543 Jan 09, 2010
    To make sure the source can not be viewed encrypt it using a free online html encryptor, put the html in an inline frame and use a no right click script in the inline frame.

You May Also Like

Related Ads

Featured