DNS Cache is database which manipulated by the Operating Systems like Windows, Linux and macOS and most of the time its called ac DNS resolver cache. This database is store information about recent visited websites, Its like memory that stores cache which helps to load websites faster. This is also helps to access heavily loaded website if you are using regularly like E-Commerce Amazon for instance. In contrast, sometime spam based websites are open by accidentally and its happens with everyone and those spam based website cache we need to remove where Flushing DNS comes into picture.In this article we will show you how to Flush Your DNS Cache from the systems.
Flush DNS Cache on Mac
You can flush your local DNS cache in macOS from your Terminal:
- Go to Applications -> Utilities -> Terminal
- Type the following command and press Enter
macOS High Sierra and later
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache
Mac OS X 11 El Capitan and macOS Sierra
sudo killall -HUP mDNSResponder
- MacOS Sierra Direct Download
- OS X El Capitan Direct Download
- OS X Yosemite Direct Download
- OS X Mavericks Direct Download
- OS X Mountain Lion Direct Download
- OS X Lion Direct Download
Older versions
Mac OS X 10.10 Yosemite
Versions 10.10.4+
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
Versions 10.10.1, 10.10.2, 10.10.3
sudo discoveryutil udnsflushcaches
Mac OS X 10.9 Mavericks
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Mac OS X 10.7 Lion and 10.8 Mountain Lion
sudo killall -HUP mDNSResponder
Mac OS X 10.5 Leopard and Mac OS X 10.6 Snow Leopard
dscacheutil -flushcache
Mac OS X 10.4 Tiger
lookupd -flushcache
Easily Flush Cache on Linux
You can flush your local DNS cache in Linux from your Terminal / Shell:
- Go to Applications -> System Tools-> Terminal
- Type the following command and press Enter
Open Terminal and type following
sudo service nscd restart sudo /etc/rc.d/init.d/nscd stop sudo /etc/rc.d/init.d/nscd start
Easily Flush Cache Windows
You can flush your local DNS cache in Linux from your command prompt
- Press WIN+R -> Type-> CMD
- Type the following command and press Enter
ipconfig /flushdns ipconfig /release ipconfig /renew
Note:-Flushing DNS regularly basis is always preferable because it prevents from attack from spammers and attackers.