Flushing the DNS cache on macOS

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder