How to drop connection rather than return HTTP 404 "No such site"

Hi. I host a website on a domain domain.tld. This works correctly.

To HTTP requests directly to my ip address, Caddy responds HTTP 404 “No such site”. I’d rather it dropped the connection. How can I achieve that?

My Caddyfile

root public

Thanks for reading

You could also add the Connection: close header.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.