Body
DNS (Domain Name System) is a service your computer uses to find the information it needs to communicate with other computers. It is kind of like a phone book but instead of matching people’s names with phone numbers it matches computer names with IP addresses. Your computer temporarily stores the DNS information it looks up into a local cache so that it does not need to keep looking up the same information over and over again. Eventually old information will be automatically flushed from the cache, but on rare occasions this does not happen before the information becomes obsolete in which case you may need to manually clear the cache in order to force it to look up the current information. This document explains how to do that for several different operating systems.
Microsoft Windows
- Launch the Command Prompt application
- Enter the following command then press the Enter key:
ipconfig /flushdns
Linux
- Launch the Terminal application
- Enter the appropriate command for your Linux version then Enter key. (You may be asked to enter your password.)
For Ubuntu, use this command:
sudo resolvectl flush-caches
For other Linux versions you can try these commands:
sudo resolvectl flush-caches
sudo service nscd restart
sudo killall -HUP dnsmasq
macOS
- Launch the Terminal application
- Enter the appropriate command for your macOS version from the list below then press the Enter key. (You may be asked to enter your password.)
For modern macOS versions, use this command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
For Lion, Mountain Lion, Maverick, El Capitan, Sierra High Sierra and Mojave enter this command:
sudo killall -HUP mDNSResponder
For Yosemite use this command:
sudo discoveryutil mdnsflushcache
For Tiger use this command:
lookupd -flushcache