{"id":502,"date":"2017-08-04T10:28:45","date_gmt":"2017-08-04T10:28:45","guid":{"rendered":"https:\/\/newdelhihosting.co.in\/blog\/?p=502"},"modified":"2017-08-07T12:22:35","modified_gmt":"2017-08-07T12:22:35","slug":"password-protected-directories","status":"publish","type":"post","link":"https:\/\/www.newdelhihosting.co.in\/blog\/password-protected-directories\/","title":{"rendered":"Understanding how password protecting a directory works"},"content":{"rendered":"<p>You can limit access to certain resources of your website by password protecting the directories they are in.When you choose to password protect a directory in cpanel,It creates a rule in .htaccess file.This rule specifies that the folder is protected and the visitor will need to provide the proper username and password to log in and view the files.<br \/>\n<strong>Steps to password Protect Directories<\/strong><\/p>\n<p>step1: Log into cpanel<\/p>\n<p>step2: Go to <strong>Files<\/strong> section and click on <strong>Directory privacy<\/strong> icon<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-657\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-privacy.png\" alt=\"\" width=\"514\" height=\"210\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-privacy.png 494w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-privacy-300x123.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-privacy-250x102.png 250w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/pre>\n<p>step3:Select the directory you want to password protect and then you will see the set Permission screen appear.Here you can provide a name for the folder you are trying to protect.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-658\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-public_html.png\" alt=\"\" width=\"526\" height=\"333\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-public_html.png 749w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-public_html-300x190.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/directory-public_html-250x159.png 250w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/pre>\n<p>step4:Next,click on the checkbox labled password protect the directory.Makes sure you have a name for the folder you are going to protect<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-659\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/main-site.png\" alt=\"\" width=\"563\" height=\"196\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/main-site.png 712w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/main-site-300x104.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/main-site-250x87.png 250w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/>\r\n<\/pre>\n<p>step5:Click on save in order to save te name you have entered for the directory and option to password protect the directory<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-660\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/save-directoryy.png\" alt=\"\" width=\"506\" height=\"236\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/save-directoryy.png 480w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/save-directoryy-300x140.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/save-directoryy-250x117.png 250w\" sizes=\"(max-width: 506px) 100vw, 506px\" \/>\r\n<\/pre>\n<p>step6:create a user to access the protected directory<\/p>\n<p>step7:click save in order to save the user that you have edited.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-661\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/create-user-directory.png\" alt=\"\" width=\"555\" height=\"320\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/create-user-directory.png 585w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/create-user-directory-300x173.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/create-user-directory-250x144.png 250w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/>\r\n<\/pre>\n<p><strong>Removing the password protection from directory<\/strong><br \/>\nIf you are finally ready to make the folder open to the public,then you can remove the password protection so that everyone can access the files.The instruction for removing protection as follows:<\/p>\n<p><strong>Step1<\/strong>:<a href=\"http:\/\/keeplearn.weebly.com\/\" target=\"_blank\" rel=\"noopener\"> Log into cpanel<\/a><\/p>\n<p><strong>Step2<\/strong>:Scroll down to the security section click the Password Protect Directories icon. Choose Web Root if you see a pop-up window, and then click Go<\/p>\n<p><strong>Step3<\/strong>:Scroll down the folder list until you see the folder you previously password protected. If the folder is a sub-folder to another one, make sure that you click on the folder icon next to the folder name. If you click on the folder name, the interface will think you&#8217;re setting protection on that folder. If you do this by accident, simply re-open the password protection interface to get back to the folder list.<\/p>\n<p><strong>Step4<\/strong>:When you find the folder that has been password protected,click on the folder name to select it.<\/p>\n<p><strong>Step5<\/strong>:Uncheck the box that says &#8220;Password protect this directory&#8221;<\/p>\n<p><strong>Step6<\/strong>:Click on Save<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can limit access to certain resources of your website by password protecting the directories they are in.When you choose to password protect a directory in cpanel,It creates a rule in .htaccess file.This rule specifies that the folder is protected and the visitor will need to provide the proper username and password to log in&#8230;<\/p>\n","protected":false},"author":1,"featured_media":667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[17,15],"tags":[],"class_list":["post-502","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-file","category-cpanel"],"jetpack_featured_media_url":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/fe-password-directory.jpg","_links":{"self":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/502"}],"collection":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/comments?post=502"}],"version-history":[{"count":10,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":856,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/502\/revisions\/856"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media\/667"}],"wp:attachment":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media?parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/categories?post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/tags?post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}