How to password protect my site.

They have: 1 posts

Joined: Sep 2007

I am thinking of building a site, but it would be just for family related stuff so I would want to have it password protected. Does anyone know how to go about doing that?

Thank you.

robfenn's picture

He has: 471 posts

Joined: Jun 2005

If something not that important, sharing photos or something, a plug-in JavaScript would probably do...

http://www.stockxpert.com/browse.phtml?f=view&id=92128

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

If you were using the 'cPanel' control panel you'd be able to use the 'password protect directories' function
and put a password on the public-html folder so a visitor would be prompted to enter a password to enter the site.

This would be more secure than a JavaScript password script

Regards, Steve

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Javascript would not be a good idea because Javascript runs on the client-side, and can be easily disabled. Using an .htaccess file would be the easiest and most secure way to do it.

A nice tutorial for setting that up can be found here -> http://www.ilovejackdaniels.com/apache/password-protect-a-directory-with-htaccess/

cPanel does have a way of automating this process as Steve said.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.