{"id":3622,"date":"2024-06-24T10:55:15","date_gmt":"2024-06-24T10:55:15","guid":{"rendered":"https:\/\/kb.cloudhostgeek.com\/?p=3622"},"modified":"2025-11-05T10:48:31","modified_gmt":"2025-11-05T10:48:31","slug":"disable-directory-listing-cpanel","status":"publish","type":"post","link":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/","title":{"rendered":"Disabling directory listing to enhance website security via cPanel"},"content":{"rendered":"\n<p class=\"has-black-color has-text-color has-link-color wp-elements-8ec14037363a92a814d0caf9262b6a50\">cPanel uses directory listing to show files and folders within a directory when there&#8217;s no main page (like index.html or index.php). When a visitor accesses a directory on a website without an index file, the web server may show a list of files and folders in that directory. This is called directory listing or directory indexing.&nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-d53b92a7d6d8a64067cb67ba7a517187\">While directory listing can be useful for website administrators to see a directory&#8217;s contents from a web browser, it&#8217;s also a security concern. Disabling directory listing for public access is highly recommended. This prevents users from seeing your website&#8217;s file structure and potentially accessing sensitive files.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-4130117ac4add2f8db39ff86234ad40b\">To manage directory listing in cPanel, use the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Indexes<\/mark><\/strong>&#8221; option:&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-black-color has-text-color has-link-color wp-elements-6d920371253e1c3d34722a23d657ef58\"><strong>Steps to Disable Directory Listing in cPanel <\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-acb28f27095c72195f146342101e6caf\">1. Log in to your <strong><a href=\"https:\/\/id.cpanel.net\/get\/login?url=\" style=\"color:#7a00df;\">cPanel account<\/a><\/strong> using your&nbsp;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">username<\/mark><\/strong>&nbsp;and&nbsp;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">password<\/mark><\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-4f12d9fc24626ce700103c58583625ab\">2. Once logged in, go to the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Advanced<\/mark><\/strong>&#8221; section or use the search bar to find &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Index Manager<\/mark>.<\/strong>&#8221;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"969\" height=\"205\" src=\"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png\" alt=\"Disable Directory Listing | BigCloudy KB\" class=\"wp-image-3629\" srcset=\"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-12.png 969w, https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-12-300x63.png 300w, https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-12-768x162.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-a2e5bf60fd9f62ce89e42e6f27528a7b\">3. Click on the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Index Manager<\/mark><\/strong>&#8221; option to control directories that are shown on your website, &nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-24661270f56cde189e1ac0c195c5846e\">4. Next, choose the specific directory where you want to disable directory listing. For a global effect, you can select the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">public_html<\/mark><\/strong>&#8221; directory.&nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-bc56216b6a8b8a5bf65b055c74615d39\">5. Once you&#8217;re in the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Index Manager<\/mark><\/strong>&#8221; interface, you&#8217;ll find various options for directory indexing. To disable directory listing, simply choose the &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">No Indexing<\/mark><\/strong>&#8221; option. Selecting this option will prevent the public from viewing the contents of this directory on your website.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"404\" src=\"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-14.png\" alt=\"cPanel Index Manager | BigCloudy KB\" class=\"wp-image-3632\" srcset=\"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-14.png 1024w, https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-14-300x118.png 300w, https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/06\/image-14-768x303.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-89605abbe66afa56884b7515926afe0e\">6. Don&#8217;t forget to click &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Save<\/mark><\/strong>&#8221; or &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">Save Changes<\/mark><\/strong>&#8221; to apply your adjustments.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-39b977dbdf336c80d3f18dd6e0977366\">7. Once you&#8217;ve disabled directory listing, if someone tries to access a directory on your website without an index file (like index.html or&nbsp;index.php), they won&#8217;t see a list of the directory&#8217;s contents anymore.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-5410e660e6774f3581179f5220d66f67\">8. Instead, they&#8217;ll likely encounter a &#8220;<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#7a00df\" class=\"has-inline-color\">403 Forbidden<\/mark><\/strong>&#8221; error or a similar message, depending on the server&#8217;s configuration. This helps to enhance the security and privacy of your website&#8217;s file structure.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Additional Resources<\/strong><\/h4>\n\n\n\n<ul class=\"has-black-color has-text-color has-link-color wp-block-list wp-elements-fa6bed7618b2e1199d19a5ba308f1981\">\n<li><strong><a href=\"https:\/\/docs.cpanel.net\/cpanel\/\" style=\"color:#7a00df;\">cPanel Documentation<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>cPanel uses directory listing to show files and folders within a directory when there&#8217;s no main page (like index.html or index.php). When a visitor accesses a directory on a website without an index file, the web server may show a list of files and folders in that directory. This is called directory listing or directory indexing.&nbsp; While directory listing can be useful for website administrators to see a directory&#8217;s contents from a web browser, it&#8217;s also a security concern. Disabling directory listing for public access is highly recommended. This prevents users from seeing your website&#8217;s file structure and potentially accessing sensitive files. To manage directory listing in cPanel, use the &#8220;Indexes&#8221; option:&nbsp; Steps to Disable Directory Listing in cPanel 1. Log in to your cPanel account using your&nbsp;username&nbsp;and&nbsp;password.&nbsp; 2. Once logged in, go to the &#8220;Advanced&#8221; section or use the search bar to find &#8220;Index Manager.&#8221;&nbsp; 3. Click on the &#8220;Index Manager&#8221; option to control directories that are shown on your website, &nbsp; 4. Next, choose the specific directory where you want to disable directory listing. For a global effect, you can select the &#8220;public_html&#8221; directory.&nbsp; 5. Once you&#8217;re in the &#8220;Index Manager&#8221; interface, you&#8217;ll find various options for directory indexing. To disable directory listing, simply choose the &#8220;No Indexing&#8221; option. Selecting this option will prevent the public from viewing the contents of this directory on your website. 6. Don&#8217;t forget to click &#8220;Save&#8221; or &#8220;Save Changes&#8221; to apply your adjustments. 7. Once you&#8217;ve disabled directory listing, if someone tries to access a directory on your website without an index file (like index.html or&nbsp;index.php), they won&#8217;t see a list of the directory&#8217;s contents anymore.&nbsp;&nbsp; 8. Instead, they&#8217;ll likely encounter a &#8220;403 Forbidden&#8221; error or a similar message, depending on the server&#8217;s configuration. This helps to enhance the security and privacy of your website&#8217;s file structure.&nbsp; Additional Resources<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"elementor_theme","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":[],"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[24,5],"tags":[39,192],"class_list":["post-3622","post","type-post","status-publish","format-standard","hentry","category-cp-website","category-cpanel","tag-cpanel","tag-website","no-post-thumbnail"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.7 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How do I Disable Directory Listing in cPanel?\u00a0<\/title>\n<meta name=\"description\" content=\"Learn how to disable directory listing in cPanel and stop cPanel from listing files and folders publicly to keep your website secure.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disabling directory listing to enhance website security via cPanel\" \/>\n<meta property=\"og:description\" content=\"Learn how to disable directory listing in cPanel and stop cPanel from listing files and folders publicly to keep your website secure.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"CloudHostGeek Help Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BigCloudyHosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-24T10:55:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-05T10:48:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bigcloudypvtltd\" \/>\n<meta name=\"twitter:site\" content=\"@bigcloudypvtltd\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How do I Disable Directory Listing in cPanel?\u00a0","description":"Learn how to disable directory listing in cPanel and stop cPanel from listing files and folders publicly to keep your website secure.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"Disabling directory listing to enhance website security via cPanel","og_description":"Learn how to disable directory listing in cPanel and stop cPanel from listing files and folders publicly to keep your website secure.","og_url":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/","og_site_name":"CloudHostGeek Help Center","article_publisher":"https:\/\/www.facebook.com\/BigCloudyHosting\/","article_published_time":"2024-06-24T10:55:15+00:00","article_modified_time":"2025-11-05T10:48:31+00:00","og_image":[{"url":"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@bigcloudypvtltd","twitter_site":"@bigcloudypvtltd","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#article","isPartOf":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/"},"author":{"name":"admin","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#\/schema\/person\/378209d3259734d846716786afbc52b0"},"headline":"Disabling directory listing to enhance website security via cPanel","datePublished":"2024-06-24T10:55:15+00:00","dateModified":"2025-11-05T10:48:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/"},"wordCount":343,"publisher":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#organization"},"image":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png","keywords":["cPanel","Website"],"articleSection":["CP Website","cPanel"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/","url":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/","name":"How do I Disable Directory Listing in cPanel?\u00a0","isPartOf":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png","datePublished":"2024-06-24T10:55:15+00:00","dateModified":"2025-11-05T10:48:31+00:00","description":"Learn how to disable directory listing in cPanel and stop cPanel from listing files and folders publicly to keep your website secure.","breadcrumb":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#primaryimage","url":"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png","contentUrl":"https:\/\/kb.cloudhostgeek.com\/wp-content\/uploads\/2024\/06\/image-12.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/disable-directory-listing-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bigcloudy.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Disabling directory listing to enhance website security via cPanel"}]},{"@type":"WebSite","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#website","url":"https:\/\/www.bigcloudy.com\/knowledge-base\/","name":"https:\/\/www.bigcloudy.com\/","description":"Your step-by-step guide to hosting, servers &amp; website tools.","publisher":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bigcloudy.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#organization","name":"BigCloudy internt services pvt ltd.","url":"https:\/\/www.bigcloudy.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/09\/cropped-BGC_logo.webp","contentUrl":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-content\/uploads\/2024\/09\/cropped-BGC_logo.webp","width":368,"height":114,"caption":"BigCloudy internt services pvt ltd."},"image":{"@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BigCloudyHosting\/","https:\/\/x.com\/bigcloudypvtltd","https:\/\/www.instagram.com\/bigcloudypvtltd\/"]},{"@type":"Person","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#\/schema\/person\/378209d3259734d846716786afbc52b0","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bigcloudy.com\/knowledge-base\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/42ea90e921e5926f1db3403e79195ea7c0e898504fd43555e6099a85c9c91443?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/42ea90e921e5926f1db3403e79195ea7c0e898504fd43555e6099a85c9c91443?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/kb.cloudhostgeek.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/3622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=3622"}],"version-history":[{"count":0,"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/3622\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=3622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=3622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bigcloudy.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=3622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}