How to flush DNS cache
Clear System DNS cache
- Windows
- MacOS 10.10.4 and above
- Linux
- Click Start.
- Type cmd in the search field.
- Right-click Command Prompt and select Run as Administrator.
Type the following command:
ipconfig /flushdns
Press Enter.
If the command succeeds, the system returns the following message: 'Windows IP configuration successfully flushed the DNS Resolver Cache.
- Launch the Terminal App
Press cmd + Space on your keyboard.
Type Terminal and press Return.
- Type the following into the terminal:
sudo killall -HUP mDNSResponder
- Press Return.
- Type your administrator password and press Return.
- Quit Terminal by pressing cmd + Q on your keyboard.
To find out whether the service is running use the following command:
sudo systemctl is-active systemd-resolved.service
Clear Browser DNS Cache
Most modern Web browsers have a built-in DNS client to prevent repetitive queries each time the website is visited. But sometime this cached results can be issue when you have recently updated the dns as it still serves from the dns cache untill expiry as per ttl.
- Google Chrome
- Microsoft Edge
- Mozilla Firefox
To clear Google Chrome’s DNS cache, perform the following steps:
Open a new tab and type
chrome://net-internals/#dns
in Chrome’s address bar.Click the “Clear host cache” button.
If that doesn’t work for you, try to clear the cache and cookies.
Open the “Clear browsing data” dialog window with CTRL+ Shift+Del in windows or cmd+Shift+ Del in mac.
- Choose a time range
- Select “All time” to delete everything.
Check the “Cookies and other site data” and “Cached images and files” boxes.
- Click the “Clear data” button.
To clear Microsoft Edge’s DNS cache, perform the following steps:
Open a new tab and type
edge://net-internals/#dns
in Edge’s address bar.Click the “Clear host cache” button.
If that doesn’t work for you, try to clear the cache and cookies.
Open the “Clear browsing data” dialog window with CTRL+ Shift+Del in windows or cmd+ Shift+Del in mac.
Choose a time range. Select “All time” to delete everything.
Check the “Cookies and other site data” and “ Cached images and files” boxes.
Click the “Clear data” button.
To clear Firefox’s DNS cache, perform the following steps:
In the upper right-hand corner, click on the hamburger icon ☰ to open Firefox’s menu:
Click on the ⚙ Options (Preferences) link.
Click the Privacy & Security or Privacy tab on the left.
Scroll down to the History section and click on the Clear History button.
Choose a time range to clear. Select “Everything” to delete everything.
Select all boxes and click “Clear Now”.
If that doesn’t work for you, try the following method and temporally disabled the DNS cache.
- Open a new tab and type
about:config
in Firefox’s address bar. Search for
network.dnsCacheExpiration
, temporally set the value to 0 and click OK. Afterward, change back the default value and click OK.Search for
network.dnsCacheEntries
, temporally set the value to 0 and click OK. Afterward, change back the default value and click OK.