Default server block that will respond with a "Not found" message for all requests to port 80, 443

Hello,

I currently use caddy with systemd socket activation, and I wanted to setup a default server block that catches all requests not matching any of my hosts and returns a 404 like ngninx or apache.

my current config is:

fd/3, fd/4 {
        log
        respond "Not found" 404
}

(That’s the socket-activated form, equivalent to listening on ports 80/443 as default_server.)

Is this the correct/recommended way to do a catch-all in Caddy?