dnsmasq to handle *.dev domains for local development

Using dnsmasq is far easier than editing your /etc/hosts file.

Do you use *.dev domains for local development? Me too.

And, since the dawn of my existence, I’ve edited /etc/hosts to add new *.dev domains — an extra 30 seconds of mental overhead at the beginning of every project, and pure hell when I’m working on a project with unlimited subdomains.

The solution? dnsmasq, which has existed forever and seems to work swimmingly. Here’s the setup instructions for Mac. If you are like me, don’t be like me and edit /etc/hosts for years. Install dnsmasq today.

One Comment

Darren March 17, 2016 Reply

yah I’ve been using dnsmasq for a couple years now. Where it really shines as well is local multisite development (on subdomains). It allows for very easy wildcard host records.

Leave a Reply