All guides

Flush the DNS cache: Windows, macOS, Linux, Chrome and phones

Your device remembers at which IP address a domain can be found. When a website moves, this note points nowhere. Flushing it takes seconds.

When flushing helps

The Domain Name System (DNS) translates names like example.com into IP addresses. So that this does not happen on every visit, operating system, browser and router store the answers for a while (the TTL). Flushing helps when

  • a site works for others but shows DNS_PROBE_FINISHED_NXDOMAIN or a timeout for you,
  • a website has just moved and you still see the old version,
  • you changed DNS records yourself and want to test the result.

Windows 10 and 11

Open the command prompt (Windows key, type cmd, Enter) and enter:

ipconfig /flushdns

The message “Successfully flushed the DNS Resolver Cache” confirms it worked.

macOS

Open Terminal and enter:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

You will be asked for your password. There is no confirmation – no message means success.

Linux

On most current systems with systemd-resolved (Ubuntu, Debian, Fedora):

resolvectl flush-caches

Whether it worked is shown by resolvectl statistics: the number of cache entries is then 0. Without systemd-resolved there is often no system-wide cache at all.

Chrome, Edge and other Chromium browsers

Chromium browsers have their own cache. Open this address and click “Clear host cache”:

chrome://net-internals/#dns

In Edge the address is edge://net-internals/#dns. It also helps to click “Flush socket pools” under chrome://net-internals/#sockets. Firefox clears its cache when you restart it.

Android and iPhone

Phones have no command for it. Most reliable: switch airplane mode on, wait ten seconds, switch it off again. That resets the network connections including the DNS cache. If that does not help, restart the device.

And the router?

Many routers store DNS answers too. Restarting the router clears this cache. If that does not help either, your provider’s DNS server may be faulty. Then enter a public DNS server for a test, for example 1.1.1.1 or 9.9.9.9.

Which records a domain has right now is shown by our DNS lookup.