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:
(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”.