caddyctl
example.com

Address

The hostname or address Caddy will respond to. Add multiple to share one configuration. Use *.example.com for wildcards (requires DNS-01 below).

HTTPS & TLS

Caddy issues and renews certificates automatically.

Site-wide

Response headers

Set, add, remove, or default headers on every response from this site.

Access control

Path routes

Match specific paths and forward each to a different handler. Routes are evaluated by specificity, not order. Caddy picks the most specific match automatically.

10.0.0.10:8080
Advanced options

Catch-all

What to do for any request not matched by a path route above.

Raw directives

Anything you type here is appended verbatim into the site block. Escape hatch for directives the UI doesn't cover, like request_body or map.

example.com {
encode zstd gzip
header {
Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
X-Content-Type-Options nosniff
X-Frame-Options DENY
-Server
}
handle /api/* {
reverse_proxy 10.0.0.10:8080
}
handle {
root * /srv/www
try_files {path} /index.html
file_server
}
}