Flush DNS Cache on macOS Sierra
The three terminal commands to clear your DNS cache on macOS Sierra.
If you’re experiencing DNS resolution issues on macOS Sierra, flush the cache with these three commands:
sudo killall -HUP mDNSResponder
sudo killall mDNSResponderHelper
sudo dscacheutil -flushcache
This kills the mDNSResponder processes and clears the dscacheutil cache. After running these, your Mac will perform fresh DNS lookups for all domains.