{"id":190,"date":"2016-09-19T10:42:10","date_gmt":"2016-09-19T10:42:10","guid":{"rendered":"https:\/\/hostduplex.com\/kb\/?p=190"},"modified":"2016-09-19T10:42:10","modified_gmt":"2016-09-19T10:42:10","slug":"how-to-protect-a-folder-with-username-and-password-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.hostduplex.com\/kb\/how-to-protect-a-folder-with-username-and-password-in-cpanel\/","title":{"rendered":"How to protect a folder with username and password in cPanel?"},"content":{"rendered":"<p><span style=\"font-size: medium;\">You can lock a directory with a password by using the cPanel <strong>Password Protected Directories<\/strong> Option.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>1.<\/strong> Log into your cPanel account.<\/span><\/p>\n<p><span style=\"font-size: medium;\"><strong>2.<\/strong> In the <strong>Files<\/strong> section, click on <strong>Directory Privacy<\/strong> Icon.<br \/>\n<img decoding=\"async\" src=\"\/kb\/img\/password-protected-directories.gif\" alt=\"\" align=\"middle\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>3.<\/strong> Click the icon to open a folder. <\/span><br \/>\n<img decoding=\"async\" src=\"\/kb\/img\/paper-folder-icon-passprotect.gif\" alt=\"\" align=\"middle\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>4.<\/strong> Click on the name of the directory you want to protect by password.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/kb\/img\/pass-pro.gif\" alt=\"\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>5.<\/strong> Under <strong>Security Settings<\/strong>, check the box next to the <strong>Password protect this directory<\/strong> and enter a name for the protected directory like <strong>Password Protected Area<\/strong>. Then click the <strong>Save<\/strong> button.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/kb\/img\/password-settings.gif\" alt=\"\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>6.<\/strong> Now click on the <strong>Go back<\/strong> button.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/kb\/img\/goback.gif\" alt=\"\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\"><strong>7.<\/strong> Scroll down the page and under <strong>Create User<\/strong> fill in the username and password fields or use the Password Generator option to generate a new random password and copy the user\/password to a notepad. You will need this when you want to open your password-protected directory and click on the <strong>Save<\/strong> button.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/kb\/img\/password-pro-user-gen.gif\" alt=\"\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\">Now, should you try to open your password-protected directory in your browser through the URL www.example.com\/myfolder, which is already password protected, your browser will prompt you to enter username and password.<\/span><br \/>\n<span style=\"font-size: medium;\"><img decoding=\"async\" src=\"\/kb\/img\/prompted-for-login.gif\" alt=\"\" \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can lock a directory with a password by using the cPanel Password Protected Directories Option. &nbsp; 1. Log into your cPanel account. 2. In the Files section, click on Directory Privacy Icon. &nbsp; 3. Click the icon to open a folder. &nbsp; 4. Click on the name of the&#8230;<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[83],"tags":[],"class_list":["post-190","post","type-post","status-publish","format-standard","hentry","category-security-cpanel"],"_links":{"self":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":0,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostduplex.com\/kb\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}