{"id":29998,"date":"2021-01-18T02:49:10","date_gmt":"2021-01-17T18:49:10","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=29998"},"modified":"2022-09-08T21:40:35","modified_gmt":"2022-09-08T13:40:35","slug":"how-to-disable-directory-browsing","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-disable-directory-browsing","title":{"rendered":"HOW TO: disable directory browsing"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"29998\" class=\"elementor elementor-29998\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7f48f20 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7f48f20\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-222552f\" data-id=\"222552f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5003e8a elementor-widget elementor-widget-heading\" data-id=\"5003e8a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What is Directory Browsing?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6048a75 elementor-widget elementor-widget-text-editor\" data-id=\"6048a75\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><strong>Directory Browsing or Directory Listing<\/strong> allows anyone to see all the files and folders when they access a website using web browser instead of webpage.<\/p><p>The web server that hosts your site not only display web pages but also the content of your web directories and other files. This happens as there is <strong>no index file<\/strong> (index.html. index.php etc) in the directory, therefore the web server did not receive the instruction to decide which web pages to display.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f1fd274 elementor-widget elementor-widget-heading\" data-id=\"f1fd274\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Why Disable Directory Listing?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-00266fa elementor-widget elementor-widget-text-editor\" data-id=\"00266fa\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>First of all, <strong>information disclosure issue<\/strong> will happen if a web server is configured to display all your website contents. This would aid an attacker or hacker to attack your blog.<\/p><p>Imagine that all your critical and confidential contents of restricted files are displayed, a hacker will potentially exploit your <strong>website vulnerabilities<\/strong> like WordPress plugins, themes, core etc. This would give him important insights into website configuration.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7fa4872 elementor-widget elementor-widget-heading\" data-id=\"7fa4872\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to Disable Directory Listing<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a496911 elementor-widget elementor-widget-text-editor\" data-id=\"a496911\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol>\n \t<li>Firstly, we recommend you to <strong>backup<\/strong> your site before making any changes.<\/li><br>\n \t<li>Next, <strong>navigate to the different folders<\/strong> of your website in your browser to see if a list of files is displayed instead of a web page.<\/li><br>\n \t<li>If you don&#8217;t find any folders that are displaying file lists, you can stop at this step.<\/li><br>\n \t<li>Then, access the<strong> File Manager<\/strong> for your hosting plan. (<a href=\"https:\/\/www.casbay.com\/business-hosting\">Business Web Hosting<\/a>\u00a0\/\u00a0<a href=\"https:\/\/www.casbay.com\/email-hosting\">Email Hosting<\/a>)<\/li><br>\n \t<li>Navigate to the folder that displayed a directory browsing.<\/li><br>\n \t<li>Edit the <strong>.htaccess (Linux) <\/strong>or <strong>web.config (Windows) file<\/strong>.\n<ul>\n \t<li><strong>Linux<\/strong>: at the top of the .htaccess file,\u00a0<strong>insert<\/strong>\u00a0the following line:<br><code>Options -Indexes<\/code><\/li>\n \t<li><strong>Windows<\/strong>: in the web.config file, find and\u00a0<strong>remove<\/strong>\u00a0the following line:\n<code>&lt;directoryBrowse&gt;<\/code><\/li><\/ul><li>Save the changes to your file.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8c3fe78 elementor-widget elementor-widget-text-editor\" data-id=\"8c3fe78\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>We hope this article helped you to learn about how to disable directory browsing. For more articles, please go to <a href=\"https:\/\/www.casbay.com.my\/guide\/\">Knowledge Base<\/a>.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>What is Directory Browsing? Directory Browsing or Directory Listing allows anyone to see all the files and folders when they access a website using web browser instead of webpage. The web server that hosts your site not only display web pages but also the content of your web directories and other files. This happens as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[117],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29998"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=29998"}],"version-history":[{"count":2,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29998\/revisions"}],"predecessor-version":[{"id":32050,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/29998\/revisions\/32050"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=29998"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=29998"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=29998"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=29998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}