Lately I’ve discovered on how to password protect site by doing few searches in Google and it’s simple. If you want password protect a specific folder of your site for certain reasons, or you want it private because it’s still under construction, through Cpanel you can do it simply.
Just log-in in your Cpanel and then go to security, under security, click on “Password Protect Directories”. Then choose the folder that you want to be password protected. If you encounter problems, connect yourself with the Hostgator tech support.