The content of any path that does not contain an Index File (within a deployment) is rendered using our Directory Listing.
Here is an example of how this could look like:
A preview of how the Directory Listing would look in action
As you can see, the directory listing contains three items:
third.pngis a Static File
However, no Index File is present. If one would be present, the path of the Directory Listing would render that file instead.
Index Files are rendered in place of the path of the directory they are located in.
For example, visiting the path
/about will serve the index file located in the
about directory if it exists. This is typically
Files that match all of the following criteria will be identified as an index:
- The file name is either
<extension>is any file extension of your choice).
- The file name does not end with a
.or contain multiple
.in a row.
If multiple files match this pattern,
index.html will take precedence followed by shortest to longest file names. That means
index.js will take precedence over
There are two types of list items (which matches the Output of a Build):
- Static Files (indicated with a blank or picture icon)
- Lambdas (indicated with a λ icon)
In the case that you would like to hide the Directory Listing for a certain path, you have the following two choices:
As mentioned above, the Directory Listing will only occur if there is no Index File inside the path the client is trying to access.
That means placing a Index File that looks like a "Not Found" error page inside the path will make the visitor think the path does not exist.