I have configured dnsmasq to resolve all .dev domains to This works great as long as my Mac is connected to the Internet (using Wi-Fi or even my iPhone in hotspot mode).

As soon as I turn off my Wi-Fi or there's no coverage (say I'm nowhere where there's no Wi-Fi connection available) I can't access my .dev websites anymore. Safari refuses to connect saying I'm offline. I would have to put my phone in hotspot mode but in this way I can't truly work offline.

Is there a way to have this setup work? I do remember it was working back in the days of Snow Leopard. Even up to Mavericks for sure.

All CLI tools work fine. Cocoa apps don't.

My dnsmasq config is as simple as:

  • can you put that in /etc/hosts as well and try? Feb 9, 2017 at 12:24
  • Ugh, I didn't see the comment. If I put the .dev domain in the hosts file it works even when I'm offline. But manually editing the hosts file is like the opposite of using dnsmasq Mar 16, 2017 at 23:42

2 Answers 2


As Set DNS server on OS X even when without internet connection suggested:

I created a file at /etc/resolver/fallback:

domain .

Then, the DNS resolution works as expected when Internet is unavailable.

Now, offline local development is possible again. ;)


I've got the same problem and tried and searched a lot, but no solution in the horizon.

But Chrome seems to be not affected by this problem, so you can use it when in no-net mode.

I'm hoping for a better solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .