Using the Directory Listing
The Directory Listing setting enables you to display the contents of a directory when a user visits its path. For example, if you create a directory at the root of your project called /assets, then when people visit https://your-site.com/assets, they will see the files and folders within that directory, as shown in the example below:


You can enable or disable Directory Listing from Advanced in your project sidebar settings.


When enabled, the Directory Listing will be displayed. When disabled, a "Not Found" error will be displayed with status code 404.
To prevent Directory Listing for a specific path, add an index file with any extension except .css, such as index.html. This file will be displayed instead of the Directory Listing.
A custom 404 page doesn't prevent Directory Listing. When the directory contains files, Vercel displays the Directory Listing instead of the 404 page.
Was this helpful?