How to Enable Directory Browsing in IIS

November 4, 2025 / Servers, Hosting & Email

When using Internet Information Services (IIS) to host websites on a Windows server, you might want to enable users to browse a directory’s contents in the absence of a default document (such as index.html or default.aspx).

This feature, known as Directory Browsing, displays a list of files and folders within a web directory directly in the browser.

In this guide, you will learn how to enable Directory Browsing in IIS using both the IIS Manager GUI and Command Line (PowerShell) methods.

What Is Directory Browsing in IIS?

  1. Directory Browsing is an IIS feature that lets users view the contents of a web directory directly through their browser when no default page is found.
  2. For example, if a user visits http://example.com/downloads/ and no index.html file exists, IIS can display a list of available files like .zip, .pdf, or .txt.
  3. Without Directory Browsing enabled, users would see an HTTP 403 “Forbidden” error instead.

Why Enable Directory Browsing?

You might enable this feature when:

  • You need to allow access to downloadable files (e.g., software builds, documents, logs).
  • You are managing a development or staging server and want to inspect directory contents easily.
  • You want to test configurations or permissions during troubleshooting.

Note: Enabling Directory Browsing in production environments is not recommended unless strictly required, as it can expose sensitive files.

Prerequisites

Before enabling Directory Browsing:

  • Ensure IIS is installed on your Windows Server.
  • You have Administrator privileges.
  • You know the site or directory path where you want to enable browsing.

Method 1: Enable Directory Browsing Using IIS Manager

  1. Press Windows + R, type inetmgr, and press Enter to open IIS Manager.
  2. In the Connections pane, expand the server’s name and select your website or directory.
  3. In the Features View, double-click Directory Browsing.
  4. In the Actions pane (right side), click Enable.
  5. Optionally, click Directory Browsing Settings to choose which details (like date, size, or extension) are shown.

Verification:
Open a browser and navigate to your directory URL (e.g., http://yourdomain.com/folder/).
You should now see a list of files and subfolders instead of a 403 error.

Method 2: Enable Directory Browsing via Command Line

If you prefer using the command line, you can enable directory browsing with AppCmd or PowerShell.

  1. Using AppCmd
    1. Run the following command in Command Prompt (as Administrator):
      appcmd set config /section:directoryBrowse /enabled:true

      This enables directory browsing globally.

    2. To enable it for a specific site, use:
      appcmd set config "Default Web Site" /section:directoryBrowse /enabled:true
  2. Using PowerShell
    1. Alternatively, use PowerShell to modify the IIS configuration:
      Import-Module WebAdministration
      Set-ItemProperty ‘IIS:\Sites\Default Web Site’ -Name
      directoryBrowse.enabled -Value $true
    2. You can replace “Default Web Site” with the name of your target website.

Security Considerations

While Directory Browsing is useful, it can also reveal sensitive directory structures and files to the public.
To enhance security:

  • Enable it only for specific folders that require public access.
  • Avoid enabling it on production servers or system directories.
  • Use web.config authorisation rules to restrict access to certain users or IPs.
  • Regularly monitor and remove temporary directories exposed through browsing.

Conclusion

Enabling Directory Browsing in IIS is a straightforward process that can be done via IIS Manager or command-line tools.

It’s helpful for testing, file sharing, or development purposes, but should be used with caution in live environments.

For managed hosting users, if you encounter issues or need help configuring IIS settings, contact your hosting support team for assistance.

Managing IIS settings and website configurations?
A Windows VPS Hosting solution provides administrator access and full control over IIS, applications and server settings.

Next, secure your IIS setup – learn How to Configure SSL Binding in IIS

Spread the love