DNS Lookups for local MAMP web server URL taking 5+ seconds
Solution 1:
Well, example.local
is typically an mDNS (Zeroconf) address, so there's every possibility that your mDNS config has broken in some way, and it's taking a few seconds for that to timeout before it falls back to /etc/hosts
.
Why not just add localhost
as a ServerAlias
and just access it via that name? Otherwise, at least use a domain that doesn't have a top-level domain that has a different meaning to your system.
Solution 2:
Yuo can also use domains which don't have .something, so just example
without the .local
. As mentioned here http://www.justincarmony.com/blog/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/ it appears OSX uses the .local for Bonjour.
I tested using just example without the .local and it appears to be solving this issue.