Password Protecting a Folder or Topic



What's covered?

Password Protecting a Folder

Note that this method will only work on a Unix server.


Click this link and enter any username and password except those below.

Now try with username pumpkin and password pie (case sensitive).

Once you have got into the demo page, you will be able to go to it again in the same session without being prompted for the username and password.

Close Internet Explorer and then try again. The username and password will be required.


You need to create three files:




Note the dot in front and that there is no file extension.


This file goes in the folder that is to be protected. It will look something like this:

AuthUserFile /path/.htpasswd

AuthGroupFile /path/.htgroup

AuthName Restricted

AuthType Basic


require group secured



The path must be the full path from the root of the server. See .htpasswd and .htgroup for information about where to locate these files.

AuthName can be whatever you want. (Shades of Tina Turner's Private Dancer here!).

After "require group" add the name of your group. Again, that can be whatever you want.


This file is best put in a folder that is above the root of your site so that it is not accessible to anyone else. It will look something like this:

secured: userone usertwo


It comprises the group name as specified in .htaccess followed by the usernames for whoever is authorised to access the folder contents.


This goes in the same folder as .htgroup. It will look something like this:

userone:encrypted password

usertwo:encrypted password


The password needs to be encrypted. Click this link to go to a site where you can enter the username and password to find out the encrypted version.

User pumpkin and password pie would be pumpkin:UjQAdKvQeyp3w


I hope this helps. I am no authority on the subject and suggest you search on .htpasswd for a whole host of sites that can provide far deeper knowledge.

I found this information by looking at Webmonkey but they have closed down. There are similar topics you might like to look at on Freewebmasterhelp and Who Is Hosting This.

Password Protecting a Specific Topic

A common forum request is the ability to password protect content. What authors are looking for ideally is the ability to password protect whole areas. Gerry Palmer found a page on Adobe's site with many utilities including one that had a method of protecting individual topics that was written in 2002 and he produced a RoboHelp 9 project demonstrating the method.

I tried the Password utility and it worked in both WebHelp and Microsoft HTML Help. Click here for the RoboHelp 9 version (you can upgrade it) of Gerry's project with instructions. Just update the project to your version of RoboHelp.

If your output is WebHelp, you may find that you need to generate with the Convert RoboHelp Edited Topics to HTML check box ticked.


If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

Topic Revisions


Changes to this page

16 May 2020

Link to Webmonkey removed. Note added after link to RoboHelp 9 download)

29 Nov 2017

Link to a password generating site changed. Previous site not working.

06 Mar 2017

Link added to a resource on the subject at Who Is Hosting This.

08 Feb 2017

Topic reviewed. No changes made.

14 Aug 2016

Password Protecting a Specific Topic section rewritten as Adobe had pulled a page that was referenced.

10 Feb 2012

Content of Snippet 140 added to this page.

29 Jun 2011

Reference to Snippet 140 added.

28 Nov 2005

Amended during conversion of site to Dreamweaver. The Webmonkey article previously referred to seems to have been pulled.