3

I noticed Mavericks prefers the DNS server to /etc/hosts (scutil --dns). There used to be a good 'ol "order hosts,bind". Is there anything equivalent for Mavericks so my hosts file is consulted before reaching out to the DNS server? Thanks.

klanomath
  • 66,391
  • 9
  • 130
  • 201

2 Answers2

1

(Cross-posting my Reddit answer here.) In my experience, it's more of an additional priority issue: IPv6. It hit me in Mavericks, but probably dates back to Lion. I develop on my local machine using /etc/hosts aliases to route requests through nginx, but on slow Wifi with slow DNS, it will often hit a 5-second timeout before bailing out on IPv6 and trying IPv4, realizing that there's a relevant /etc/hosts entry, and resolving that way. Not very convenient to have +5s tacked onto my recode-reload cycle.

Adding a ::1 example.com line to go along with my 127.0.0.1 example.com lines resolved the issue for me.

chbrown
  • 267
0

I've noticed this dns authority priority inversion in 10.10.2 (Yosemite) but not back in Mavericks.

I just started this thread. https://www.reddit.com/r/mac/comments/2y22sj/yosemite_ignoring_localhost_etchosts_redirects/