Figured out how to get anything.lan (including foo.bar.lan etc) to resolve to 127.0.0.1 on my Mac laptop, using dnsmasq installed from Homebrew https://til.simonwillison.net/macos/wildcard-dns-dnsmasq
Local wildcard DNS on macOS with dnsmasq

I wanted to get wildcard DNS running on my Mac laptop, for development purposes. I wanted http://anything.mysite.lan/ to point to my localhost IP address.

... and it turns out that's not necessary at all, because `foo.bar.localhost` resolves to `127.0.0.1` on macOS (and Linux) out of the box!
@simon .... 😲... well... that... might save a lot of tweaks to my /etc/hosts thanks!