Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
OS X Dnsmasq setup for .dev domains

Install dnsmasq using Homebrew. Edit the dnsmasq.conf file (Homebrew will tell you where to put it) to contain:


Then make sure Dnsmasq is running (again follow Homebrew instructions).

Create the /etc/resolver/dev directory (using root) if it doesn't exist yet and create a resolver for .dev:

sudo bash -c 'echo "nameserver" > /etc/resolver/dev'

Then ping and it should be pinging

Note that dig does not consult Dnsmasq, so test with ping instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment