.localhost domains on macOS with dnsmasq Install dnsmasq brew install dnsmasq Add an address entry to point everything under .dev to 127.0.0.1 in /usr/local/etc/dnsmasq.conf echo "address=/.localhost/127.0.0.1" >> "$(brew --prefix)"/etc/dnsmasq.conf Start dnsmasq sudo brew services start dnsmasq Create the resolver directory (if it doesn't already exist) sudo mkdir -p /etc/resolver Create a new resolver configuration to point to the dnsmasq instance echo "nameserver 127.0.0.1" | sudo tee /etc/resolver/localhost