Active Web Hosting Logo


Password Protecting A Web Site Directory

You can have some limited security on your web site and password protect any page in your web directories. Note that you can not password protect whole directories on your web server, just certain pages. If you are looking to password protect directories on your CGI server, please see How To Password Protect A CGI Directory for more information. Note that you can not use CGI or your CGI server to password protect any directory, pages or files on your web server.

Using Encrypted Password Script

The Encrypted Password Script you can use to password protect any page on your web server. This works by using an encoded username and password you generate on the Encrypted Password Script site, and then creating a page that will check the username and password and then go to the secret page. This way it will encrypt the actual name of the page so that people viewing the page source will not know the name of the secret page.

  1. Visit the Encrypted Password Script web page. You will see simple directions to add the script. In step 1 on that page you will generate the encrypted pair. Be sure to write down the actual user name and password so you can give it to those you want to access the .html file you are trying to protect.

    Note that the password will be the filename of the secret page. For example, if the secret page is spveasef.html then you want to enter spveasef for the password. It's best to create random numbers and letters (no special characters or punctuation) for the secret page filename/password.

  2. Select all the code in step 2 on the Encrypted Password Script page and copy and paste it into an html text file you want to use for the login page. Be sure to edit the if(usercode==134603040&&passcode==126906300) so that it uses the generated usercode and passcode that you created in step 1. When done, save it as login.html, index.html or whatever you wish.

  3. Upload the login html file to same directory that your secret page will be located. You will then give visitors the url similar to http://yourdomain.com/secret_dir/login.html where you want to replace yourdomain.com with your actual domain name and secret_dir with the name of the directory your file is in. login.html represents the name of the html file you edited in step 2 above.

  4. Now create your secret page and save it as your username (not the encrypted number) with the .html extension as noted in step 1 above.

Now any time someone visits the log in page, they will need to log in to access your secret page.

How can I keep my secret page out of search engine databases?

Just because you installed a password protection scheme to protect your secret page from prying eyes, it does not mean that it won't get accessed by someone who might have seen the link in a search engine. This protection scheme is simple and basic, so don't use it for anything overly sensitive. However, there are some ways you can help eliminate the chances of the page from showing up in a search engine. Please refer to How do I keep search engines from adding certain pages? for more information on keeping search engine robots from adding the secret page to their database.

 


Home - Support - Management - About Us
... Active Web Hosting, 213 N Stephanie St G318, Henderson, NV 89074 ...
(702) 449-2337