How to Flush DNS on Windows, Mac, Linux, and Chrome

3 min readUpdated September 24, 2026

Flushing your DNS cache clears the temporary record your computer keeps of which IP address a domain points to. If a website changed servers, or you just fixed a DNS record and it's still showing the old result, a flush forces your device to look up the fresh answer instead of using the stored one.

What does flushing DNS do?

Every time you visit a site, your computer saves the DNS answer for a while so it doesn't have to ask again on the next visit. That's the DNS cache. The problem shows up when a record changes, like moving to a new host or fixing a typo in an A record, but your computer keeps using the old, cached answer. Flushing DNS clears that saved data and forces a fresh lookup. It doesn't change anything on the server side. If the record itself is wrong, flushing won't fix that, only a real DNS update will. You can check what a domain's records actually look like right now with a DNS lookup.

Windows: ipconfig /flushdns

  1. Press Windows key + R, type cmd, and press Enter. Or search for "Command Prompt" in the Start menu.
  2. Type this command and press Enter:
ipconfig /flushdns
  1. You should see: "Successfully flushed the DNS Resolver Cache."

You don't need administrator rights for this command on most Windows versions. If it fails with an access error, right-click Command Prompt and choose "Run as administrator."

PowerShell alternative, if you'd rather not use cmd:

Clear-DnsClientCache

This runs the same operation in PowerShell and gives no confirmation message if it succeeds, which is normal.

Mac: flush DNS cache on macOS

The command changed across macOS versions, so use the one that matches your system.

macOS Sonoma, Ventura, Monterey, Big Sur, and Catalina:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Older macOS (Yosemite and El Capitan):

sudo discoveryutil mdnsflushcache

You'll need to enter your Mac's login password after sudo. Nothing will print on screen as you type it, that's expected. Press Enter when done.

If you're not sure which macOS version you're running, click the Apple menu, then "About This Mac."

Linux: clear DNS cache

The command depends on which DNS resolver your distribution uses.

systemd-resolved (most modern Ubuntu, Fedora, and Debian systems):

sudo systemd-resolve --flush-caches

or on newer systemd versions:

sudo resolvectl flush-caches

nscd (if your system uses the Name Service Cache Daemon):

sudo systemctl restart nscd

dnsmasq:

sudo systemctl restart dnsmasq

If you're not sure which one applies, run systemd-resolve --status first. If that command isn't found, your system likely doesn't cache DNS locally at the OS level, and the cache you need to clear is in the browser instead.

Chrome: clear its internal DNS cache

Chrome keeps its own DNS cache separate from your operating system's. Clearing the OS cache won't touch this one.

  1. Type chrome://net-internals/#dns in the address bar and press Enter.
  2. Click Clear host cache.

If that page doesn't load in newer Chrome versions, use chrome://histograms/DNS or simply restart the browser, which also clears the in-memory cache.

Still seeing the old result after flushing?

  • Check the TTL. Your local flush only clears your device. Your ISP's DNS resolver, or your router, may still have the old value cached for as long as the record's TTL. Run a DNS lookup to see the current TTL and records directly from Google and Cloudflare's resolvers.
  • Restart your router. Many routers cache DNS too. Unplug it for 30 seconds if flushing your device doesn't help.
  • Try a different network. If the new value shows up on mobile data but not your home Wi-Fi, the issue is upstream of your device, not something a flush can fix.
  • Confirm the DNS record actually changed. If the record itself is still wrong at the source, no amount of flushing will show the new value. Check the live record before assuming it's a caching issue.

Put what you learned into practice - instant results, no signup.