Vocabulary
- tld means top-level domain and is the highest level of the DNS hierarchy.
- fqdn means fully qualified domain name and is the combination of the domain, host, and tld, eg www.google.com
Local Development
scutil --dnsdscacheutil -flushcache.dev is a registered icann tld, .test is reserved for development. .local is also technically appropriate.
brew install dnsmasq; #install dnsmasq
mkdir -pv $(brew --prefix)/etc/; #create config directory
echo 'address=/test/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf; #route *.test to localhost
sudo brew services start dnsmasq; #autostart dnsmasq
sudo mkdir -v /etc/resolver; #create resolver dir
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'; #add nameserver to resolvers