{"id":1857,"date":"2023-01-06T12:05:58","date_gmt":"2023-01-06T12:05:58","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1857"},"modified":"2026-06-19T03:54:04","modified_gmt":"2026-06-19T03:54:04","slug":"how-to-disable-directory-listing-in-cpanel","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/","title":{"rendered":"How to Disable Directory Listing in cPanel"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Directory listing allows visitors to view the files and folders inside a website directory when there is no default index file such as <code>index.html<\/code>, <code>index.php<\/code>, or <code>default.html<\/code>. If directory listing is enabled, sensitive files may become publicly visible, which can create security and privacy risks.<\/p>\n\n\n\n<p>To prevent this, directory listing should be disabled in cPanel.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before starting, make sure you have:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Valid cPanel login credentials.<\/li>\n\n\n\n<li>Access to the website\u2019s document root directory, usually <code>public_html<\/code>.<\/li>\n\n\n\n<li>Permission to modify directory settings in cPanel.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Disable Directory Listing Using cPanel Indexes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Log in to cPanel<\/h3>\n\n\n\n<p>Log in to your cPanel account using your valid username and password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Open Indexes<\/h3>\n\n\n\n<p>In the cPanel dashboard, go to the <strong>Advanced<\/strong> section and click <strong>Indexes<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Select the Directory<\/h3>\n\n\n\n<p>The website directory structure will be displayed. Click the <strong>Edit<\/strong> option for the directory where you want to disable indexing.<\/p>\n\n\n\n<p>For most websites, the document root directory is usually:<\/p>\n\n\n\n<p><code>public_html<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Choose No Indexing<\/h3>\n\n\n\n<p>Select the <strong>No Indexing<\/strong> option.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Save the Changes<\/h3>\n\n\n\n<p>Click the <strong>Save<\/strong> button to apply the changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Verify the Success Message<\/h3>\n\n\n\n<p>Once saved, cPanel will display a success message confirming that directory listing has been disabled.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Disable Directory Listing Using cPanel File Manager<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Open File Manager<\/h3>\n\n\n\n<p>Log in to cPanel and go to the <strong>Files<\/strong> section. Click <strong>File Manager<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Select the Directory<\/h3>\n\n\n\n<p>In the left-side panel, right-click the directory where you want to disable indexing.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p><code>public_html<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Click Manage Indices<\/h3>\n\n\n\n<p>From the drop-down menu, select <strong>Manage Indices<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Select No Indexing<\/h3>\n\n\n\n<p>The Indexes settings page will open. Select the <strong>No Indexing<\/strong> option.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Save the Changes<\/h3>\n\n\n\n<p>Click the <strong>Save<\/strong> button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Confirm the Update<\/h3>\n\n\n\n<p>A success message will be displayed, confirming that directory listing has been disabled for the selected directory.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Disabling directory listing in cPanel helps protect website files from being publicly visible. It is a simple but important security step. By selecting <strong>No Indexing<\/strong> for your website directory, you can prevent unauthorized users from browsing files and folders directly through the browser.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Directory listing allows visitors to view the files and folders inside a website directory when there is no default index file such as index.html, index.php, or default.html. If directory listing is enabled, sensitive files may become publicly visible, which can create security and privacy risks. To prevent this, directory listing should be disabled in ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[33],"tags":[5,173],"class_list":["post-1857","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel","tag-disable-directory-listing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction Directory listing allows visitors to view the files and folders inside a website directory when there is no default index file such as index.html, index.php, or default.html. If directory listing is enabled, sensitive files may become publicly visible, which can create security and privacy risks. To prevent this, directory listing should be disabled in ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-06T12:05:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-19T03:54:04+00:00\" \/>\n<meta name=\"author\" content=\"meenakshi k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"meenakshi k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/\"},\"author\":{\"name\":\"meenakshi k\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\"},\"headline\":\"How to Disable Directory Listing in cPanel\",\"datePublished\":\"2023-01-06T12:05:58+00:00\",\"dateModified\":\"2026-06-19T03:54:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/\"},\"wordCount\":342,\"commentCount\":0,\"keywords\":[\"cPanel\",\"Disable Directory Listing\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/\",\"name\":\"How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2023-01-06T12:05:58+00:00\",\"dateModified\":\"2026-06-19T03:54:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2023\\\/01\\\/06\\\/how-to-disable-directory-listing-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Disable Directory Listing in cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/baf2a3c7578108699459ee9dfee7211f\",\"name\":\"meenakshi k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g\",\"caption\":\"meenakshi k\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/meenakshi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base","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:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base","og_description":"Introduction Directory listing allows visitors to view the files and folders inside a website directory when there is no default index file such as index.html, index.php, or default.html. If directory listing is enabled, sensitive files may become publicly visible, which can create security and privacy risks. To prevent this, directory listing should be disabled in ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2023-01-06T12:05:58+00:00","article_modified_time":"2026-06-19T03:54:04+00:00","author":"meenakshi k","twitter_card":"summary_large_image","twitter_misc":{"Written by":"meenakshi k","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/"},"author":{"name":"meenakshi k","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f"},"headline":"How to Disable Directory Listing in cPanel","datePublished":"2023-01-06T12:05:58+00:00","dateModified":"2026-06-19T03:54:04+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/"},"wordCount":342,"commentCount":0,"keywords":["cPanel","Disable Directory Listing"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/","name":"How to Disable Directory Listing in cPanel - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2023-01-06T12:05:58+00:00","dateModified":"2026-06-19T03:54:04+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2023\/01\/06\/how-to-disable-directory-listing-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"How to Disable Directory Listing in cPanel"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/baf2a3c7578108699459ee9dfee7211f","name":"meenakshi k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17c0a3923b9a31a41d8de2fdc928e514efe879fe17b6e5d2814b7f81ed2356e5?s=96&d=mm&r=g","caption":"meenakshi k"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/meenakshi\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1857"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1857\/revisions"}],"predecessor-version":[{"id":3838,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1857\/revisions\/3838"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}