Skip to content

Instantly share code, notes, and snippets.

@zmts
Created December 5, 2023 11:01
Show Gist options
  • Save zmts/e95a04ea11dcc809681093c66f08ec99 to your computer and use it in GitHub Desktop.
Save zmts/e95a04ea11dcc809681093c66f08ec99 to your computer and use it in GitHub Desktop.

Too slow response .local domains Mac OS

The Multicast DNS feature of Bonjour technology allows devices on a local network to connect to each other by name without a separate DNS server. By default, any hostname ending in .local is treated as a Bonjour host rather than by querying the DNS server entries in Network preferences.

Though the .local domain is not defined as a valid top-level domain on the Internet, some private networks have DNS servers that assign hostnames in the .local domain. By default Mac OS X does not use the DNS server to resolve these names. This may result in unexpected failures to connect to .local hostnames defined by your server.

To fix this problem you need to add IPv6 entries for each of your vhosts in your /etc/hosts file:

127.0.0.1       localhost
127.0.0.1       myproject.local
255.255.255.255 broadcasthost
::1             localhost
::1             myproject.local

source:

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