This page is about Caddy 1 and will stay here forever.

User Guide


index sets the list of file names that are used as "index" files. When a directory path is requested instead of a specific file, the directory is checked for existing index files. The first matching file name is served.

The default index files are, in this order:

  1. index.html
  2. index.htm
  3. index.txt
  4. default.html
  5. default.htm
  6. default.txt

Using this directive overwrites the list, it does not append to it.


index filenames...


Use only goaway.png and easteregg.html as index files:

index goaway.png easteregg.html

Need help with this feature?

Join us in the Caddy forum, where the open source community gathers to share their knowledge.

Does your company use Caddy?

Purchase a commercial license to use Caddy with your business and for basic email support, along with other benefits!