{"id":3561,"date":"2010-10-20T13:26:48","date_gmt":"2010-10-20T17:26:48","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=3561"},"modified":"2025-03-15T04:44:25","modified_gmt":"2025-03-15T08:44:25","slug":"how-to-password-protect-directories-detailed-tutorial","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/how-to-password-protect-directories-detailed-tutorial\/","title":{"rendered":"How to Password Protect Directories in cPanel"},"content":{"rendered":"\r\n<p>If you want to restrict access to specific folders on your website, cPanel provides a built-in tool called <strong>Password Protect Directories<\/strong>. This feature adds a login prompt when users attempt to access the protected directory, ensuring only authorized users can view its contents.<\/p>\r\n\r\n\r\n<h2>Step 1: Access the Password Protection Tool<\/h2>\r\n<p>Log into your <strong>cPanel<\/strong> and navigate to:<\/p>\r\n\r\n<ul>\r\n<li>Go to the <strong>Security<\/strong> section.<\/li>\r\n<li>Click on <strong>Directory Privacy<\/strong> (formerly &#8220;Password Protect Directories&#8221;).<\/li>\r\n<\/ul>\r\n\r\n\r\n<h2>Step 2: Select the Directory to Protect<\/h2>\r\n<ul>\r\n<li>A list of your directories will appear.<\/li>\r\n<li>Click on the folder you want to password-protect.<\/li>\r\n<\/ul>\r\n\r\n<h2>Step 3: Enable Password Protection<\/h2>\r\n<ul>\r\n<li>Check the box labeled <strong>Password protect this directory<\/strong>.<\/li>\r\n<li>Enter a name for the protected directory (this will appear on the login prompt).<\/li>\r\n<li>Click <strong>Save<\/strong> to apply the protection.<\/li>\r\n<\/ul>\r\n\r\n<h2>Step 4: Create a User and Password<\/h2>\r\n<ul>\r\n<li>Enter a <strong>Username<\/strong> and <strong>Password<\/strong> for access.<\/li>\r\n<li>Click <strong>Add\/Modify Authorized User<\/strong>.<\/li>\r\n<\/ul>\r\n\r\n\r\n<h2>Important Considerations<\/h2>\r\n<ul>\r\n<li><strong>Create the directory first:<\/strong> Ensure the folder exists before enabling password protection.<\/li>\r\n<li><strong>Avoid using the same directory for FTP and web access:<\/strong> It may cause conflicts.<\/li>\r\n<li><strong>Do not protect your webroot (public_html):<\/strong> This will block access to your entire website.<\/li>\r\n<\/ul>\r\n\r\n<h2>How to Remove Password Protection<\/h2>\r\n<ul>\r\n<li>Go back to <strong>Directory Privacy<\/strong> in cPanel.<\/li>\r\n<li>Select the protected folder.<\/li>\r\n<li>Uncheck <strong>Password protect this directory<\/strong> and remove users if necessary.<\/li>\r\n<\/ul>\r\n\r\n<h2>Need Assistance?<\/h2>\r\n<p>If you need help setting up directory protection, UnderHost\u2019s expert support team is available 24\/7. Contact us via <a href=\"https:\/\/customerpanel.ca\/client\" target=\"_blank\">@CustomerPanel<\/a> for professional assistance.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Secure sensitive directories on your website by enabling password protection in cPanel.<\/p>\n","protected":false},"author":1,"featured_media":4817,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-3561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-controlpanel","category-how-to"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3561"}],"version-history":[{"count":3,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3561\/revisions"}],"predecessor-version":[{"id":5175,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3561\/revisions\/5175"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4817"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}