How to Create a Private Web Page

The Web by its very nature is not private. While you can’t create your own private network and have it on the web, you can utilize some tools to hide a web page from the public and essentially make it private to those who have a user name and password created by you.

Step

Make your web page the way you normally would any other web page. Upload the file to a specified directory that you want to make private. You can call this folder anything you want but this is the folder you will make private. Any web pages you want to be private should be placed under this folder. Make any private web pages you want and upload them to this directory.

Step

Create a .htaccess file. You will need to login to your website account directly using a telnet or SSH program. This will only work on a Unix or Linux style server. If you are using Windows-based web servers you will need to contact your website hosting company to see what they can provide. You can upload the .htaccess file using an FTP program or once in the account you can use an editor such as Pico to create a file. Whether you use Pico or a word processing program you will create a file with the following information in it:

Step

AuthName “Private Webpage” AuthType Basic AuthUserFile /path/your/directory/and so on/ .htpassword. require valid-user

Step

The Authname can be whatever you want. The information after the AuthUserFile is the location on your server where you will save the password file you create later. You will save this file as .htaccess. You will move this file to the folder you want to make private. It is better to use a plain text editor and not Word because Word adds in extra information that you do not need and uses unreadable smart quotes.

Step

Initiate a htpasswd file. Once logged into your web account through telnet or SSH type the command “htpasswd –c .htpasswd username” where username is the name you want to use to login to the private page. You will be prompted for a password. Enter the password you want to use. Move the .htpasswd file to the location you named in AuthUserFile. You can add more users by using the same command without the “-c” option.