Skip to content
How-to
2 min read

The Directory Listing – which displays the contents of a directory – is served when a particular path is a directory and does not contain an index file.

The contents of a directory – displayed by the Directory Listing feature.

You can enable or disable the feature from the "Advanced" page in the Project Settings.

When enabled, the Directory Listing will be displayed. When disabled, a "Not Found" error will be displayed with status code 404.

Toggling Directory Listing in the Project Settings.

To prevent the Directory Listing from being displayed for a specific directory, add an index file whose filename matches the pattern index.* (except .css), such as index.html, which will then be displayed instead of the Directory Listing when accessing that path.

Use the "Source" tab on the Deployment View to check the source and output of your Deployment's Build if the file you're looking for is not being displayed.

Instead of displaying a specific file for a certain path in place of the Directory Listing, you can also customize the 404 error.

  • If the Directory Listing is being displayed on the / path of your Deployment instead of your application, Vercel likely wasn't able to run a Build Command (defined in the Project Settings). Check out our Build Step documentation for more details.
  • If you have tried everything above, please either leave feedback below about information that might be missing or contact our Support Team.
Last updated on February 6, 2023