How to clear the DNS Cache on your macOS?
Overview
This article provides instructions on how to clear the DNS Cache on a computers and web browsers. This procedure is necessary in order for previously cached resolutions to be cleared out and subsequent lookup to be performed based on newly configured DNS settings.
OS X 10.4 TIGER
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
Run the following command in the command line and hit enter
lookupd -flushcache
OS X 10.5 and 10.6 LEOPARD
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
Run the following command in the command line and hit enter
dscacheutil -flushcache
OS X 10.7 and 10.8 Lion
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
sudo killall -HUP mDNSResponder
OS X 10.9 and 10.10.4 Yosemite, 10.11 El Capitan and 10.12 Sierra
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
This article provides instructions on how to clear the DNS Cache on a computers and web browsers. This procedure is necessary in order for previously cached resolutions to be cleared out and subsequent lookup to be performed based on newly configured DNS settings.
OS X 10.4 TIGER
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
Run the following command in the command line and hit enter
lookupd -flushcache
OS X 10.5 and 10.6 LEOPARD
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
Run the following command in the command line and hit enter
dscacheutil -flushcache
OS X 10.7 and 10.8 Lion
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
sudo killall -HUP mDNSResponder
OS X 10.9 and 10.10.4 Yosemite, 10.11 El Capitan and 10.12 Sierra
Click the Terminal icon in the dock or in Finder under Application/Utilities/Terminal
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder