It seems that wildcards are not supported in the /etc/hosts file.

What is the best solution for me to resolve all *.local domains to localhost?


1 Answer 1


You'd really need to run your own DNS server and use wildcards. Exactly how you'd do that would depend on the DNS package you ran.

  • 5
    Indeed. This is rather trivial with dnsmasq; a configuration with address=/local/ does what OP requests.
    – ephemient
    Oct 21, 2010 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.