How to clear/flush the DNS cache in Google Chrome?
Solution 1
Navigate to chrome://net-internals/#dns and press the "Clear host cache" button.
Solution 2
Sometimes you need to flush the socket pools after flushing the DNS:
chrome://net-internals/#sockets
Solution 3
"Navigate to chrome://net-internals/#dns" doesn't work in the Google Chrome browser, at least on my system. Looks like this solution maybe works for the Google Chrome OS, but not the Google Chrome browser more generally speaking. For me the link redirects here:
The Chromium Projects
It appears "Empty the Cache" is the better solution. Also note my browser says "Preferences" rather than "Options"
Via http://www.google.com/support/forum/p/Chrome/thread?tid=026b6a1d9151a6e3&hl=en
"Go to tools -> options -> Under the hood -> Clear Browsing data and check 'empty the cache' and click on clear browsing data. Yes yes, I know, it is not the DNS cache I would expect it to clear, but hey it seems to. And now it works for me."
Solution 4
Clicking "clear host cache" in chrome://net-internals/#dns
should do it for Google Chrome, but there are other DNS caches to consider on your machine.
Windows:
ipconfig /flushdns
OS X pre-10.7 (before Lion):
sudo dscacheutil -flushcache
OS X 10.7–10.9 (Lion, Mountain Lion, Mavericks):
sudo killall -HUP mDNSResponder
OS X 10.10+ (Yosemite):
sudo discoveryutil mdnsflushcache
OS X 10.11, 10.12+ (El Capitan, Sierra):
sudo killall -HUP mDNSResponder
Your router may be caching the DNS as well (restart it or read the manual). The ultimate test is to use dig, but this uses your network's DNS host, not the authoritative server by default:
dig superuser.com
To query right from the source, try something like:
dig superuser.com @ns1.serverfault.com
Solution 5
In OS X 10.9.1 w/ Chrome 32 I needed to both clear the host cache and flush the socket pools to get Chrome to refresh the DNS cache:
- Navigate to chrome://net-internals/#dns and click "Clear Host Cache"
- Navigate to chrome://net-internals/#sockets abd click "Flush Socket Pools"
Related videos on Youtube
Mee
Updated on September 17, 2022Comments
-
Mee almost 2 years
As you probably know Google Chrome has its own internal DNS cache. Is there a way to clear it without having to wait for the time out or close the browser?
-
Nolonar about 11 yearsThe only reason for me to flush Chrome's DNS cache is because if I don't, I can't access Google. Luckily, Google's not the only search engine out there (or else I wouldn't have found this question) and I only have to deal with Chrome at work.
-
Ketil over 10 yearsFor me, this is probably caused by having an incorrect DNS-server in resolv.conf. (I am trying to access an internal server on a VPN). The people at T-com have misconfigured their DNS to respond with their advertisement site instead of NXDOMAIN, and the people who wrote Chrome didn't care to respect the resolv.conf order, but instead happily use whatever DNS server appears to work.
-
Nathan Long about 10 years
-
-
Mee over 13 yearsStrangely, this only works in one direction. I have a mapping in the hosts file that maps a domain name to the local machine (i.e. to 127.0.0.1), when I remove the mapping and flush the DNS cache in Chrome, it correctly loads the site from the internet, but when I add the mapping again to the hosts file, it still loads the site from the internet. It shows the cached DNS list empty in Chrome after clearing the DNS cache (also cleared the OS cache using ipconfig /flushdns), still, it loads the site from the internet! Seems like a bug.
-
Mee over 13 yearsEven more annoying, Chrome shows the IP address correctly (127.0.0.1) for that domain in the DNS cache list (after flushing and trying to load the site again), still it loads the site from the internet.
-
Ian about 13 yearsawesome, is there a list of all the chrome://* options anyway does anyone know?
-
pxl almost 13 years@Ian chrome://about
-
chakrit over 12 yearsFor copy and paste into address bar: chrome://net-internals/#dns
-
andrew cooke over 12 yearsthis does not work for all addresses. the answer given below (preferences; clear browsing data) does. due to the strange way my cable modem powers up chrome had cached the dns for my isp as "news.bbc.co.uk" (the modem sends you to the isp before it's fully up). following the above did not remove it. going via the preferences did.
-
minamhere about 12 yearsThis seems to work to force Chrome to recognize changes to the hosts file.
-
TrickyDBA over 11 years@Mee Restarting System's "DNS Client" Service from Services.msc might help.
-
Air over 11 yearsInteresting note: if you have clicked the 'Stop' button in the red title bar, the 'Clear host cache' button will disappear. In any case this approach does not appear to actually clear the DNS cache.
-
Air over 11 yearsConfirmed this worked for me, Clear Browsing Data -> Empty the cache. No other method worked. Thanks PJ.
-
Rob Osborne over 11 yearsThis seems to only work sometimes when you have multiple user profiles. Chrome is almost the perfect developers browser except for bugs like this.
-
andrewtweber about 11 yearsSame problem here. I have tried clearing cache, clearing the internal DNS cache, ipconfig flush dns, and it is still loading a local website from the live domain. If I open it in "Incognito" it works, or in Firefox it works, but normal Chrome refuses to reset its DNS
-
Martin Argerami almost 11 yearsThis didn't work for me. Emptying the cache (as the second answer suggests) did.
-
chovy almost 11 yearsThis worked for me on both chrome and chromium when /etc/resolver/foo.com was being ignored.
-
Paul Draper over 10 yearsThis worked...except when I went to incognito. I just couldn't figure out why that wasn't working.
-
DocSalvager over 10 yearsLooks like Google is gradually making name changes to some internal URLs over different versions. As of version 27.0.1421.0 (184274)...
-
daboross over 10 yearsDoing this and then going to the website and pressing shift+f5 3 times worked for me! Didn't work without using shift+f5 3 times though.
-
Canadian Luke over 10 yearsHi Bart, welcome to Superuser! Unfortunately, this question is about the computer-version of Chrome, not the mobile version. I'd suggest editing your answer to reflect the desktop version. Thanks
-
Markus Amalthea Magnuson over 10 yearsThis worked for me on Mac Chrome, after having tried the
chrome://net-internals/#dns
flush trick mentioned here, without success. -
MaxPower about 10 yearsAt least clearing Cached images and files did not work for me (Chromium 33 on Ubuntu) after turning on OpenVPN and thus switching my active DNS server. (Clear host cache as in the popular answer did not work either.) So far I have not found anything that works except restarting the browser, or entering the IP address in the URL.
-
Adam Tal about 10 yearsWasn't enough for me. Had to "ipconfig /flushdns" in command prompt (found in answer below)
-
blueintegral almost 10 yearsI needed it in Windows 8.1 as well, so it's not just OS X.
-
pengemizt over 9 yearsChrome for Linux also need it
chrome://net-internals/#sockets
-
Bing over 9 yearsClearing Cached images and files worked for me! No clue why, but it did. Windows 8.1, Chrome 41.0.2272.89 m
-
Pacerier about 9 yearsNote that Chrome now monitors the
hosts
file and autoclears the dnscache whenever there are any changes to thehosts
file. —You can easily test if that works on your system by adding a blank line after yourhosts
file, and the list atchrome://net-internals/#dns
will be autoupdated.— Windows' dnscache service will also (at least on win 8.1) monitor the hosts file for changes, so after you have updated yourhosts
file, simply clicking on the button "Flush socket pools" will work. Nothing else is needed. -
Pacerier about 9 yearsRefreshing will not help one bit. The active TCP sockets will still be active. You either wait it out (1-2 minutes) or manually flush them.
-
Pacerier almost 9 yearsJust tested on Server 2003 too. Whenever there are any changes to the hosts file, dnscache service automatically reloads the cache without any need for
ipconfig /flushdns
nonsense.ipconfig /flushdns
seems to be a red herring in this entire issue. -
Pacerier almost 9 years@AdamTal, Actually if you update your hosts file, the dns cache service will reload itself. See superuser.com/questions/203674/… for more info.
-
bertieb almost 9 yearsHi Boreas320, can you provide a summary of what your link provides in your answer in case it becomes out of date? Answers that are only/mostly a link are discouraged as they can go stale.
-
Rob Scott over 8 yearsWorked for me, even after flushing dns in cmd and doing the accepted answer
-
Elijah Lynn over 8 yearsChrome for Linux just needs a socket flush. No DNS flush. superuser.com/a/611712/30982
-
Elijah Lynn over 8 yearsThis does not work on Chrome for linux. But just a socket flush works. superuser.com/a/611712/30982
-
Elijah Lynn over 8 yearsAwesome, this is the only solution that works on Chrome for Linux (Ubuntu 14.04). In fact a DNS flush doesn't affect anything. All that is needed is to do a socket flush. I consider this a bug.
-
Elijah Lynn over 8 yearsJust went to report a bug and did a search... already exists. Please star/follow this bug report => code.google.com/p/chromium/issues/detail?id=268059
-
Ezra over 7 years"sudo discoveryutil mdnsflushcache" didn't work on El Capitan (10.11) for me, but "sudo killall -HUP mDNSResponder" did, it said that discoveryutil did not exist, maybe it's Sierra and up?
-
i_a about 7 yearsUp! Wonderful idea! Thanks! However it didn't work for me until I replaced the javascript with document.getElementById('sockets-view-flush-button').click();
-
Hippyjim over 6 yearsNo longer works.
-
Bojan Hrnkas over 6 years@Hippyjim, it never worked alone. You also have to clear DNS (chrome://net-internals/#dns). My answer is only usefull when clearing DNS alone doesn't work.
-
Hippyjim over 6 yearsYeah, I did both. Still nothing. Thanks anyway. I'm working around it by using an Incognito window - which makes absolutely no sense!
-
byronyasgur about 6 yearsclearing cached images and files worked for me too - nothing else did
-
Tatsh almost 6 yearsNow I wish for a way to do this on command line along with my other stuff to flush DNS cache.
-
Sharak over 5 yearsOn Firefox my local page works just fine. On Chrome it still loads online resource. And I've tried every single answer here. This is just ridculous! Because of the MANY things like this one I like Firefox better. Chrome is bad for my health!
-
jmgarnier about 5 yearsextension no longer exists
-
Nickolay Kondratenko almost 5 yearsIt works, thank you. Just want to add that also need to restart the browser.
-
Albert Renshaw over 4 yearsThis worked for me when the DNS flush didn't, 2019 -- Chrome Version 77.0.3865.120
-
Cédric Françoys over 4 yearsWindows 10, Chrome 79+ : chrome://settings/clearBrowserData : General tab, tick
Images and Files
checkbox. Done. -
sope about 4 yearsnot working for me at Version 80.0.3987.163 (Official Build) (64-bit)
-
ShreevatsaR about 4 yearsI also had to kill service workers:
chrome://inspect/#service-workers
and click "terminate" (also double-check inchrome://serviceworker-internals/
) -
Hay almost 4 yearsClearing the browser cache is the only thing that works for me, even after waiting for a 15 minutes or so... Thanks!
-
Michael Liquori about 3 yearsthe internals link works fine for me, but doesn't fix the problem. Clearing the cache does, thanks!
-
vaughan almost 3 yearsIncognito tab worked for me.
-
avia over 2 years@jmgarnier it actually does.
-
avia over 2 yearsEDIT: For those still struggling (?) I ended up changing my DNS reseolver all simply and entirely to 8.8.8.8. Well, I can't post an answer to recap my situation so I'll post here. After trying a combination of all answers below (incl. the plugin), I still can't resolve a simple .com domain in Chrome (!!). Resolves fine in Firfox or else. Even restarted my system twice.
-
ssppjj over 2 yearsThis finally fixed my problem and I can start hitting the new address.
-
ssppjj over 2 yearsThis is not enough for me. I had to hit chrome://net-internals/#sockets as well.
-
Admin about 2 yearsNot Working in chrome 101.0.4951.67
-
Admin almost 2 yearsthis solution is not working for me. chrome still not load site