Main menu
WalkswithMeApache Security WordPressPassword Protected Directories using Cpanel

Password Protected Directories using Cpanel

Password Protected Directories using Cpanel is very simple to setup and It will improve your website security in one more level. In any CMS the hacking attempt is very high compared to Frameworks. Specially WordPress is weak in it security system and updates compare to other CMS like Joomla or Drupal.

The password protected directories will never fix the full hacking possibility of your website. It will give an additional security using Cpanel. The best options are keep going with latest version , do not allow spam bolts to crawl your sites. keep the folders with proper index.html files and so on.

Here in this article I will explain How can we creates “Password Protected Directories Using Cpanel”. It simple with two steps.

Password Protected Directories Using Cpanel

Password Protected Directories Using Cpanel

Step 1 :
  • Login to Cpanel with your Credentials .
  • Under Security tab choose the Password protected directories Options.
  • Click the icon it will open a window with following options.
  • Choose your folder name to make protect.
  • Password Protected Directories Using Cpanel

    Password Protected Directories Using Cpanel

     

  • Then on security section you can give a custom name for the folder.
  • The you have to create a User to access the password protected directory.(User Name/Password).

Password protection allows you to require a username and password to access a folder within your site from the web. When password protecting a folder, there are a few things to remember. Protecting a folder will protect all folders within that folder. Also, you will need to create users who can access the protected directory. You can give the password protected directory any name, no matter what the actual directory is called.

 

Step 2 :

If you’re using CMS like WordPress , While making Password Protected Directories your Ajax script will stop working. Bcoz the Ajax calls the  admin-ajax.php in the  wp-admin directory. So making  wp-admin protected you have to remember this settings.

You can solve this issue with following option create an htaccess file under wp-admin folder and have the following code. Make sure this file is created under wp-admin folder and not in your root folder.


<Files admin-ajax.php>
Order allow,deny
Allow from all
Satisfy any
</Files>

May Result with 404 redirect loop.

Open up your main htaccess file under root and paste the following code on the top of the section.


ErrorDocument 401 default

You’re Done with Password Protected Directories Using Cpanel.

Hope it will protect your wordpress / other websites private folders with passwords.

Password Protected Directories using Cpanel

Password Protected Directories using Cpanel

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

FacebookTwitterGoogle+RSS