Edge: DNS Flush

Bronze Contributor

I ran into a persistent "resolving host" issue on one of my computers this weekend and worked my way through the usual resolution steps (W10 DNS flush (ipconfig /flushdns), browser DNS flush and so on) in order to clean up the various DNS caches and start with a clean slate.

 

It does not appear that Edge DNS flush (edge://net-internals/#dns, similar to chrome://net-internals/#dns or opera://net-internals/#dns) is operative. 

 

The "Clear host cache" button shows up but doesn't seem to be functioning:

 

EdgeDNSFlush.jpg

 

I don't know if this is a bug or a feature, but it is a difference from other Chromium-based browsers I've had the occasion to use.

11 Replies

@tomscharbach Thanks for reaching out, Tom! I brought this back to the team and they didn't have an immediate answer. @Eric_Lawrence , do you have any insight into this?

 

Fawkes (they/them)
Project & Community Manager - Microsoft Edge

@tomscharbach Thanks for the note!

Can you elaborate on your determination that the button doesn't work? What sort of testing did you do?

Notably, the button provides no feedback of completion, and is styled in such a way in Edge that it is more likely to appear that clicking it hasn't actually "pushed" the button. But it does dispatch the clearHostResolverCache call to the browser.

@tomscharbach I found the same "issue" you likely saw. Not only did I need to ipconfig /flushdns and edge://net-internals/#dns but also Ctrl+F5 on the website in questions.

This problem still happens today. flushing the DNS or CTRL+F5 doesn't clear the previously cached DNS entry for a site, but opening an new "private" window does resolve the site at the new DNS/IP location. Returning to the original tab and refeshing still brings up a dead site. Closing all Edge instances and reopening (I didn't check if any Edge background processes kept running), didn't resolve the issue. Went off to make a coffi, hit refresh in same tab as before and all was good. Probably a 5-10 min delay.
I happy to take a look at your NetLog where you found edge://net-internals/#dns was ineffective.

Keep in mind that if you have an active (reusable) connection to the site, I'm not sure that flushing the browser's DNS cache will close that connection.
I had a similar problem and determined that occurred when the target host's ip address changed after it had been resolved by a secondary DNS server. I thiis case I have a split DNS setup and the local DNS server did not respond with the local address for the host. The internet server responded with the domain's public IP address which cannot be used to reach the internal server. Flushing the did not resolve the issue. Closing and reopening Edge also did not resolve the problem. I changed Edge settings so all processes end when you close the app. Closed the app and restarted. At that point the local address was retrieved from the local DNS server and the connection was made.

Based on @Eric_Lawrence's comment it would appear that the DNS client is not being consulted even when opening a new window. It's as if Edge has created something that behaves like a cache although it appears that it's reusing connections. The problem is that it doesn't seem to know that the server's address has changed even if the server is currently unreachable.

Perhaps the Edge should lookup the address from time-to-time and avoid reusing of stale addresses.

I have recently been dealing with this when we are testing multiple web front ends for our student information system. 

We change the DNS in our hosts file.

Then we have to run ipconfig /flushdns

Next step is to edge://net-internals/#dns go here and Clear Host Cache

Next go to edge://net-internals/#sockets and Close Idle Sockets and Flush Socket Pools. 

Then we go to the website it will use the IP address from the hosts file. 

I also had a resolving host problem, which I solved in the end by deleting all site data in edge://settings/siteData .  Some DNS info probably is stored there which doesn't get deleted with DNS flush? (some other comment suggested it has to do with internet explorer mode -https://learn.microsoft.com/en-us/answers/questions/652141/edge-is-not-woking-properly-for-a-particu... )

@Menoblack That should not be the case, no. If anything, it should be the opposite (if you have a web page entirely in the cache, or if you have a serviceworker installed by the target site, your browser might not need to connect to the server at all). 

 

If you have a NetLog (https://textslashplain.com/2020/01/17/capture-network-logs-from-edge-and-chrome/) from your failing scenario, you could look to see what precisely is happening with DNS resolutions.

@Eric_Lawrence I took a look, but I don't see a lot of differences, the request before the change had +URL_REQUEST_DELEGATE_CONNECTED [dt=1] (dt=0 after) and HTTP_CACHE_CREATE_ENTRY [dt=0] (dt=1 after). Maybe the site is loaded from cache even though I used ctrl f5? I see in some other topic that might be because that site has the Cache-Control: no-store, no-cache, must-revalidate headers, which work against eachother - nginx - My browser keeps showing cached page despite sending no-cache, no-store, must-revalidate fro... . Could that be a reason?

 

ps. I've tried 3 more times, to let the correct site load I need to clear the host cache on edge://net-internals/#dns , and then delete edge://settings/siteData after. (now a browser reboot also works, that wasn't the case the first time.)

 

ps2. not posting the net export here because of privacy reasons 🙂

There's nothing wrong with sending that set of Cache-Control headers; they'll be treated as |no-store|. Having said that, Cache-Control headers don't apply to every layer of caching in the browser, so they're not a complete guarantee against reuse of a response. But on a full-page navigation, they should be effective.

The thing you want to look at in the netlog is the DNS transaction entries.