It is said that, no data online is safe. Someone can enter and see/use your online data. But we can always try our best to stay safe. Some of the things that we need to ensure is, a secure software (Ex:- like WordPress as a CSM) and a strong password. But at the end, backup of our website and database are the only hope for recovering the data(if some unfortunate things happen).
After receiving 3 to 4 emails with the same question, I thought of writing it on the blog. So here is the procedure for password protecting the directory through cpanel.
Log into your hosting account cpanel. Navigate to “Security” section. Click on the “Password Protect Directories” link.
Next a popup will appear, select the web root and click GO.
Select the directory that you want to password protect. This may be some what a puzzle! for first time user.
If you want to password protect a directory inside another directory, then click on the folder icon beside the link of main directory (see above image for better visualization).
Once you navigate to the directory that you want to password protect, click on the directory name and enter a name (any name), usename and password.
You can select and delete any of the older users by selecting the username and clicking on the Delete User button.
Why Password Protect ?
Password protect those folders which you want to secure.
For Example:- If you have a payment gateway, where you process your customers credit cards, then do not take chance or do not compromise with the security aspects. Its not your security, its your customers security, which is of prime importance!
Password protecting such sensitive directories is crucial. Customers would never feel comfortable to be your guest, if you are not serious about their security!