Would you like to learn how to disable the directory listing on the IIS server? In this tutorial, we are going to configure the IIS server to deny the directory browsing feature.

• Windows 2012 R2
• Windows 2016
• Windows 2019

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Tutorial IIS - Disabling the directory browsing

Start the application named: IIS Manager.

Start IIS Windows

On the IIS Manager application, select your website.

On the right part of the screen, access the option named: Directory browsing.

IIS Directory browsing

On the top right part of the screen, click on the Disable option.

IIS - Disable Directory listing

Optionally, use the command-line to disable the directory browsing feature.

Copy to Clipboard

In our example, we disabled the directory browsing feature for a website on the IIS server.

To test the installation, open the Chrome browser and try to access a directory.

In our example, the following URL was entered in the Browser:

• http://www.gameking.tips/images

The IIS server will forbid the directory browsing.

IIS - Forbiden access

If the directory browsing feature is enabled, the IIS server will allow the user to browse the directory.

IIS - Allow directory listing

Optionally, you may use the CURL command of a Linux computer to test the configuration.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Congratulations! You disabled the directory browsing feature on the IIS server