I'm a developer on OSX, I've always used .local for local sites im developing, Since ML I've been running DNSmasq to workaround the service query order so I can continue to use /etc/hosts to define my records (which I believe DNSmasq picks up).

I thought it was working but it's seems inconsistent, works for some and not for others.

Pinging a domain it's not working with seems to have a long delay about 30 seconds. Visiting that same domain in a web browser never resolves. Yet digging the domain, returns the A record results instantly from DNSmasq


robaldred:~/Sites/sasp (master)
 → ping sasp.local

# insert long pause here

PING localhost ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.089 ms
64 bytes from icmp_seq=1 ttl=64 time=0.136 ms
64 bytes from icmp_seq=2 ttl=64 time=0.141 ms


robaldred:~/Sites/sasp (master)
 → dig sasp.local

; <<>> DiG 9.8.3-P1 <<>> sasp.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55538
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;sasp.local.            IN  A

sasp.local.     0   IN  A

;; Query time: 0 msec
;; WHEN: Mon Apr  8 15:05:25 2013
;; MSG SIZE  rcvd: 44


# Mac OS X Notice
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
# This file is automatically generated.


nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
nameserver 2620:0:ccc::2




First, you should pick a suffix other than .local. That pseudo-TLD has special meaning for mDNS/Bonjour. I use .dev, but you can use anything that isn't a valid TLD or pseudo-TLD.

Then, you may find my answer to another superuser question useful. dig won't work, but ping, curl, etc. will work, as will opening your site in a web browser.

| improve this answer | |

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.