To password protect a folder in your webspace, follow these steps:
Please note: these specific instructions can only be used within your standard homepages webspace.
Open your text editor (Notepad will do for Windows users, OS X users can use TextEdit) and paste in the following block of text.
AuthUserFile /share/isp/plusnet/www/uu/username/htdocs/path/.htpasswd
AuthName "Please Log On"
AuthType Basic
require valid-user
Save the text file as htaccess.txt - we'll rename it later.
Go to the htpasswd manager on our Usertools site.
You'll now see a box that shows each username you entered, followed by an encrypted version of their passwords.
It'll look something like this:
andrew:lklt1SXOoPlQ2
Copy & Paste this into a new file in your text editor and save it as htpasswd.txt
Connect to your webspace and go to the folder you want to password protect, and upload both files.
Use your FTP program to CHMOD htaccess.txt to 744 (File Owner: read, write & execute, group & public: read only).
CHMODing the files offers security by preventing other users from altering your files.
The final step is to rename the two files as follows - note the leading full stop:
The files will disappear the next time you refresh, if you need to edit or remove them you'll need to use an FTP program that allows you to see hidden files such as FileZilla. If you're not sure how to do this, there's a step-by step guide here.
That's it! If it's worked, you'll be asked for a username and password the next time you browse to the protected folder.
Popularity: 2% [?]
This entry was posted by Andrew B on Thursday, October 8th, 2009 at 3:12 pm and is tagged with .htaccess, .htpasswd, password protect, webspace and is posted in the category Tools, Website Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
There are currently no comments on this post.


Here at Plusnet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!
We sell broadband, phone, VoIP and more to homes and businesses in the UK. Winner of 9 out of 11 Categories in the 2008 USwitch survey. Winner of "Best Consumer ISP" at 2008 ISPA awards. Voted number 1 in the Broadband Choices 2008 survey.
© Plusnet plc All Rights Reserved. E&OE
Support Library is powered by WordPress