How to disable empty host head?

I found a domain(not mine) directing my caddy server ip , someone told me that I must close empty host head config. I have never setup empty host head in my Caddyfile , How can I disable empty host head ?

If your Caddyfile starts like this, for example:

:80, :443

(only port specified, no hostnames), then it will serve that site for all Host names that come in, including empty ones. You simply have to specify a domain name that you want to serve and it will reject others for that site.

There are no that setting in my Caddyflie

You’re good, then - Caddy will not serve a site unless the Host header matches the site label, so requests like that will receive “No such site”.

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