{"id":521,"date":"2024-10-24T06:33:33","date_gmt":"2024-10-24T06:33:33","guid":{"rendered":"https:\/\/realhost.co.in\/articles\/?p=521"},"modified":"2024-10-24T09:31:21","modified_gmt":"2024-10-24T09:31:21","slug":"a-step-by-step-guide-to-enabling-directory-password-protection-in-cpanel","status":"publish","type":"post","link":"https:\/\/realhost.co.in\/articles\/a-step-by-step-guide-to-enabling-directory-password-protection-in-cpanel\/","title":{"rendered":"A Step-by-Step Guide to Enabling Directory Password Protection in cPanel"},"content":{"rendered":"\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#introduction\">Introduction<\/a><\/li><li><a href=\"#what-is-directory-password-protection\">What is Directory pass &#8211; protection?<\/a><\/li><li><a href=\"#s\">Steps for enabling the directory password. <\/a><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>Securing sensitive directories on <a href=\"https:\/\/realhost.co.in\/\" data-type=\"link\" data-id=\"https:\/\/realhost.co.in\/\">your website<\/a> is essential for protecting critical data. cPanel offers a built-in feature that allows you to password-protect specific directories, preventing unauthorized access. By enabling directory password protection, you can ensure that only authorized users can view or modify files within protected areas. This guide will walk you through the steps to enable directory password protection in cPanel.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-directory-password-protection\">What is Directory pass &#8211; protection?<\/h2>\n\n\n\n<p>Directory password protection is a security feature that allows you to restrict access to specific directories (folders) on your website by requiring a username and password to view or enter those areas. This additional layer of authentication ensures that only authorized users can access sensitive files or sections of a website.<\/p>\n\n\n\n<p>Commonly used in web hosting control panels like cPanel, this feature is especially helpful for protecting admin areas (e.g., WordPress <code>wp-admin<\/code>), private content, or development environments that shouldn&#8217;t be publicly accessible.<\/p>\n\n\n\n<p>When enabled, users trying to access the protected directory will be prompted to enter valid login credentials. This reduces the risk of unauthorized access, protecting important data and helping prevent malicious activity such as brute force attacks or unauthorized modifications.<\/p>\n\n\n\n<p><strong>Use Cases for Directory Password Protection:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>WordPress Admin (wp-admin)<\/strong>: Adding another layer of security for the admin login page.<\/li>\n\n\n\n<li><strong>Development\/Testing Environments<\/strong>: Restricting access to staging sites or development versions of a website.<\/li>\n\n\n\n<li><strong>Private Content<\/strong>: Protecting sensitive documents or files from public view.<\/li>\n\n\n\n<li><strong>Membership Areas<\/strong>: Ensuring that only registered or approved users can access exclusive content.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s\">Steps for enabling the directory password. <\/h2>\n\n\n\n<p>Here are the steps for enabling the Directory password protection in cPanel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"417\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-29.png\" alt=\"\" class=\"wp-image-544\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-29.png 626w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-29-300x200.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Log in to <a href=\"https:\/\/cpanel.net\/\" data-type=\"link\" data-id=\"https:\/\/cpanel.net\/\" rel=\"nofollow noopener\" target=\"_blank\">cPanel<\/a><\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"462\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-7.png\" alt=\"\" class=\"wp-image-522\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-7.png 486w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-7-300x285.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/figure>\n\n\n\n<p><strong>2. Under the &#8220;Files&#8221; section, click on &#8220;Directory Privacy&#8221; (or &#8220;Password Protect Directories&#8221;).<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"298\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-12.png\" alt=\"\" class=\"wp-image-527\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-12.png 876w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-12-300x102.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-12-768x261.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p><strong>3. Navigate to the <code>public_html<\/code> directory.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"705\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-30-1024x705.png\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-30-1024x705.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-30-300x206.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-30-768x528.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-30.png 1125w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>4. Click on &#8220;Edit&#8221; button straight to the domain&#8217;s folder name.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"77\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-21-1024x77.png\" alt=\"\" class=\"wp-image-536\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-21-1024x77.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-21-300x23.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-21-768x58.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-21.png 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>5. Enable the check box of password protected directory and click &#8220;Save&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"378\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-23-1024x378.png\" alt=\"\" class=\"wp-image-538\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-23-1024x378.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-23-300x111.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-23-768x284.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-23.png 1256w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6. Click &#8211;> Go Back.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"197\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-24-1024x197.png\" alt=\"\" class=\"wp-image-539\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-24-1024x197.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-24-300x58.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-24-768x148.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-24.png 1218w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>7. Once entered the &#8220;Username&#8221; &amp; &#8220;Password&#8221; Click <strong>&#8220;Save&#8221;<\/strong> to apply the password protection.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"356\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-25.png\" alt=\"\" class=\"wp-image-540\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-25.png 778w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-25-300x137.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-25-768x351.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n\n\n<p>8. You will get a Success message only the password was applied. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"177\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-26-1024x177.png\" alt=\"\" class=\"wp-image-541\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-26-1024x177.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-26-300x52.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-26-768x133.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-26.png 1333w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can cross check the same by seeing the path with lock symbol. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"55\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-28-1024x55.png\" alt=\"\" class=\"wp-image-543\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-28-1024x55.png 1024w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-28-300x16.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-28-768x41.png 768w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-28.png 1084w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, the directory will be password-protected, and users will need the login credentials to access it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"991\" height=\"457\" src=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-27.png\" alt=\"\" class=\"wp-image-542\" srcset=\"https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-27.png 991w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-27-300x138.png 300w, https:\/\/realhost.co.in\/articles\/wp-content\/uploads\/2024\/10\/image-27-768x354.png 768w\" sizes=\"auto, (max-width: 991px) 100vw, 991px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Enabling directory password protection in cPanel is a simple yet effective way to secure critical parts of your website. By following these steps, you can safeguard sensitive information, ensuring that only authorized users can access protected areas. This feature adds an extra layer of defense, helping you maintain control over your web content and enhance site security.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Securing sensitive directories on your website is essential for protecting critical data. cPanel offers a built-in feature that allows you to password-protect specific directories, preventing unauthorized access. By enabling directory password protection, you can ensure that only authorized users can view or modify files within protected areas. This guide will walk you through the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":551,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[45],"tags":[],"class_list":["post-521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-directory-password-protection-in-cpanel"],"_links":{"self":[{"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":2,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":550,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/posts\/521\/revisions\/550"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/media\/551"}],"wp:attachment":[{"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/realhost.co.in\/articles\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}