Having a domain means you can share many things with the world. But sometimes you don’t want the world to see everything.
Your cpanel provides a tool that can put a username/password lock on any directory in your site’s file structure (which is more or less the structure of your domain).
Before adding a password, you need to put something in their web site to protect. Let’s say you have a collection of readings and media files that are part of an assignment for a group students that you do not not want another group to see these will go inside the part of your file structure that corresponds to content in a subdomain called
From the cPanel, navigate to the File Manager inside the Files group, and find this directory. Use the + Folder menu item to create a new subdirectory named
assigned. Then, use the + Upload menu item to put three files there, a PDF, and audio file, and an image.
So this directory and it’s content are public viewable at
We will now show the steps to make this directory viewable only with a username/password that you devise.
In cPanel, under Files, open the Directory Privacy icon. This opens an interface that is similar to the File Manager in that you see the directory structure.
Click once on the folder or label to navigate into the directory for the
thoughts.gadgets.stateu.org subdomain. Find the entry for the directory you wish to protect, and click the EDIT button on the far right.
Your first step is to create a display name for this directory (this is used on the interface that will ask a visitor to log in). We just call ours “Assignments”
After clicking in the next screen we can create a username and a password that must be entered to gain access. For this directory, the username that must be entered is
learners. The password? Choose a secure one or let cPanel choose it for you. Just make sure you save it in a place you can find later.
Save and now try accessing that directory again at
https:///thoughts.gadgets.stateu.org/assigned subdomain. Now there is a gate keeper!
These directory passwords can be set for any directory in your web structure.
Example for "Password Protecting Part of Your Domain":