Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

How to flush the DNS cache on Windows, macOS, Linux and Chrome

To flush the DNS cache, run ipconfig /flushdns on Windows, sudo killall -HUP mDNSResponder on macOS, or resolvectl flush-caches on Linux with systemd-resolved. Chrome keeps a separate cache that you clear at chrome://net-internals/#dns.

The short answer
  • Each layer has its own cache: operating system, browser and your router or resolver.
  • Flushing only clears your device. It cannot clear your ISP or public resolver cache.
  • After flushing, query a public resolver to see what everyone else sees.
Try the dns lookupFree, live, no signup

What command flushes DNS on each system?

Flush commands (run as administrator or with sudo)
SystemCommandSource
Windowsipconfig /flushdnsMicrosoft Learn
macOS (OS X 10.10.4 and later)sudo killall -HUP mDNSResponderApple support article 101481, archived
Linux with systemd-resolvedresolvectl flush-cachessystemd documentation
Chrome (browser cache only)chrome://net-internals/#dns, then Clear host cacheChromium developer write-up

Apple marks its article archived and lists the command for OS X 10.10.4 and later, so confirm it against your macOS release if it fails.

What do the commands look like?

Run in Command Prompt, Terminal or a shell
# Windows (Command Prompt as administrator)
ipconfig /flushdns
ipconfig /displaydns        :: view the cache

# macOS
sudo killall -HUP mDNSResponder

# Linux (systemd-resolved)
resolvectl flush-caches
resolvectl statistics        # shows cache size and hits

How do you clear the Chrome DNS cache?

  1. 01

    Open the DNS page

    Type chrome://net-internals/#dns in the address bar.

  2. 02

    Clear host cache

    Click "Clear host cache". This clears only the browser resolver cache, not the operating system or router.

  3. 03

    Reload

    Existing connections can still hold the old address; close the tab or restart the browser if the old site persists.

  4. 04

    Flush the OS cache too

    If it still resolves wrongly, run the operating system command above.

Why might flushing not fix it?

The resolver still has the old answer

Your router, ISP or public resolver may hold it until the TTL expires. See DNS propagation.

The record is wrong

Check the authoritative server with dig or nslookup before blaming a cache.

A hosts file entry overrides DNS

An entry in the hosts file wins over DNS for that name. Check it if only one site is wrong.

What is the fastest way to confirm a stale cache is the problem?

  • Query a public resolver directly, for example nslookup example.com 1.1.1.1, and compare it with the default answer
  • If they differ, a local or ISP cache is stale; flush your device and wait out the TTL for the rest
  • If they match and are wrong, the record itself is wrong; fix it at the DNS host
  • Try the site on another network, such as a phone on mobile data
  • Check the hosts file for a manual override of the domain

What about routers and public resolvers?

Router

Many home routers cache DNS. Restarting the router clears that layer.

Public resolvers

You cannot flush them from your device. Wait for the TTL, or use the provider cache purge tool if it offers one.

VPNs

A VPN can change which resolver you use, so a record may look different with the VPN on and off.

Common questions

What does flushing DNS do?

Flushing DNS deletes the cached lookups stored on your device, so the next visit to a site asks a resolver again. It clears stale or negative entries, but does not change DNS records or other devices.

How do I flush DNS on Windows?

Open Command Prompt as administrator and run ipconfig /flushdns. Windows reports that the DNS Resolver Cache was flushed. ipconfig /displaydns lists what is cached.

How do I flush DNS on a Mac?

Run sudo killall -HUP mDNSResponder in Terminal and enter your password. Apple documented this for OS X 10.10.4 and later; the article is archived, so confirm for your macOS version.

Is flushing DNS safe?

Yes. The cache simply refills as you browse, so the first lookups after a flush are marginally slower. Flushing does not remove any settings or files.

How do I flush DNS on Linux?

On a distribution using systemd-resolved run resolvectl flush-caches. Other setups use different resolvers, for example a local dnsmasq or nscd service, and each has its own restart or flush command, so check which one your system runs.

Do I need to restart the browser after flushing DNS?

Not always. The operating system flush works immediately, but a browser keeps its own cache and open connections. Clear the browser host cache or restart the browser if the old address still shows.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.