How to Flush DNS: Windows, Mac, Linux, Fedora & Chrome
Key takeaway
Flushing DNS deletes the answers your device has stored for names it looked up, so the next visit asks DNS again. On Windows, run ipconfig /flushdns in Command Prompt. On macOS, run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder in Terminal. On Linux with systemd-resolved (Ubuntu, Fedora), run sudo resolvectl flush-caches. In Chrome, open chrome://net-internals/#dns and click Clear host cache. It's safe and only affects your own device.
Check it now

Start reading
- Flush DNS Commands at a Glance
- How DNS Cache Works: TTL, Cache Levels, and Expiration
- When Should You Flush DNS?
- How to Flush DNS on Windows 10 and Windows 11
- How to Flush DNS on macOS (Every Version Since El Capitan)
- How to Flush DNS on Linux (Ubuntu, Fedora, Debian)
- How to Flush DNS in Google Chrome
- How to Flush DNS in Firefox, Edge, Safari and Others
- How to Flush DNS on Android and iPhone
- How to Flush DNS on Your Router
- How to Verify Your DNS Cache Was Flushed
- What to Do If Flushing DNS Does Not Fix the Problem
- Frequently Asked Questions
Flush DNS Commands at a Glance
To flush DNS, run one command for your system. Flushing deletes the answers your device has stored for names it looked up recently, so the next visit asks DNS again and gets the current address.
See a domain's current records and TTL
The command for each system:
| Where | Command or setting |
|---|---|
| Windows 10 and 11 | ipconfig /flushdns (Command Prompt), or Clear-DnsClientCache (PowerShell) |
| macOS | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Linux with systemd-resolved (Ubuntu, Fedora 33+) | sudo resolvectl flush-caches |
| Chrome, Edge, Brave | chrome://net-internals/#dns (or edge://, brave://) → Clear host cache |
| Firefox | about:networking#dns → Clear DNS Cache |
| Android and iPhone | Turn Airplane mode on for 10 seconds, then off (or restart) |
| Router | Restart it |
Why bother? DNS records change: a site moves to a new server or host, and your stored answer still points at the old address. Answers from the local cache come back almost instantly, while a lookup that goes out to a resolver took about 30 ms from our home line to Google's 8.8.8.8 (26 October 2026), so caching is worth having until an answer goes stale.
DNS is cached in several places, your browser, your operating system and often your router, so a stubborn stale answer may need flushing at more than one level.
How DNS Cache Works: TTL, Cache Levels, and Expiration
Every DNS record carries a TTL (time to live) set by the domain's owner: how many seconds a cache may keep it. Values usually range from 300 seconds (5 minutes) to 86,400 seconds (24 hours); Cloudflare, for example, uses 300 seconds by default.
Each layer keeps its own copy:
- Browser — Chrome normally uses its own built-in DNS client (on by default on Windows, macOS, Linux, ChromeOS and Android). It keeps each answer for the record's TTL, at least 60 seconds, and keeps a "doesn't exist" answer for the zone's negative TTL. When it falls back to the operating system's resolver, it keeps answers for 60 seconds and doesn't keep failures (Chromium source). Firefox holds up to 3,200 names and uses 60 seconds when the OS gives no TTL (Firefox prefs).
- Operating system — Windows' DNS Client service, macOS's mDNSResponder and Linux's systemd-resolved keep answers until their TTL runs out. Some Linux systems (Debian by default, minimal installs) don't cache at all.
- Router — many home routers run dnsmasq, which caches 150 names by default (dnsmasq manual); OpenWrt raises that to 1,000.
- Your DNS provider — your ISP's or public resolver's cache serves everyone using it. You can't flush your ISP's, but Google Public DNS and Cloudflare let anyone purge a name from their caches (Google, Cloudflare). Otherwise, wait for the TTL or switch resolver.
Flushing clears the browser and operating-system layers, and restarting the router clears its layer. To skip a stale provider cache, switch to a public resolver such as Cloudflare's 1.1.1.1 or Google's 8.8.8.8. You can see any record's current TTL with DNS Lookup.
When Should You Flush DNS?
Your system expires cached answers on its own, so you don't need to flush on a schedule. Flush when:
- A site won't load for you but works for others — errors like DNS_PROBE_FINISHED_NXDOMAIN or DNS server not responding
- You still see a site's old version after it moved to a new server or host
- You changed DNS servers — for example to Google DNS (8.8.8.8) or Cloudflare (1.1.1.1) — and want the change now
- A certificate warning appears after a site moved — your stored address still points at the old server and its old certificate
- You edited DNS records (A, CNAME, MX) and want to see the change before the old TTL runs out. The DNS Propagation Checker shows whether resolvers worldwide have it
- You suspect a poisoned or hijacked answer — flushing drops it from your caches
How to Flush DNS on Windows 10 and Windows 11
Windows has two ways to flush DNS: Command Prompt and PowerShell. Both clear the Windows DNS Client service's cache. ipconfig /flushdns works on every version, including Windows Server and older releases.
Method 1: Using Command Prompt
- Step 1 — Press
Windows + S, typecmdand open Command Prompt (an ordinary window is enough on current Windows 10 and 11; if Windows says the operation requires elevation, right-click it and choose Run as administrator) - Step 2 — Type
ipconfig /flushdnsand press Enter - Step 3 — You should see: "Successfully flushed the DNS Resolver Cache."
That is all it takes. Your Windows DNS cache is now empty, and the next time you visit a website, Windows will query your configured DNS server for a fresh IP address. The ipconfig command is the standard Windows networking utility — /flushdns is just one of its many switches.
Method 2: Using PowerShell
PowerShell has its own DNS cmdlet that provides the same functionality with additional options:
# Flush the DNS cache
Clear-DnsClientCache
# Verify the cache is empty (should return very few entries)
Get-DnsClientCache
# Count cached entries
Get-DnsClientCache | Measure-Object | Select-Object CountClear-DnsClientCache does exactly the same thing as ipconfig /flushdns. The advantage of PowerShell is the Get-DnsClientCache cmdlet, which shows cached entries in a table format that is easier to filter and export than ipconfig /displaydns.
How to Flush DNS on macOS (Every Version Since El Capitan)
On a Mac you flush DNS from Terminal. The same command works on every version from El Capitan (10.11) to today's releases, including macOS 26 Tahoe.
| macOS Version | Flush DNS Command |
|---|---|
| Big Sur (11) and later, including Tahoe (26) | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Catalina (10.15) back to El Capitan (10.11) | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Yosemite (10.10.4 to 10.10.5) | sudo killall -HUP mDNSResponder |
| Yosemite (10.10 to 10.10.3) | sudo discoveryutil mdnsflushcache |
| Lion (10.7) to Mavericks (10.9) | sudo killall -HUP mDNSResponder |
- Step 1 — Press
Command + Spaceto open Spotlight, type Terminal and press Enter - Step 2 — Paste
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderand press Enter - Step 3 — Enter your Mac password when asked. Terminal shows no output, but the cache is cleared
dscacheutil -flushcache clears the Directory Service cache, and killall -HUP mDNSResponder tells mDNSResponder, the macOS DNS resolver, to drop its cached answers; it doesn't restart the process. Safari has no DNS cache of its own, so this covers Safari too; quit Safari (⌘Q) as well, so it drops connections still open to the old address.
How to Flush DNS on Linux (Ubuntu, Fedora, Debian)
Linux caches DNS only if a caching service runs. Ubuntu and Fedora (33 and later) use systemd-resolved; Debian and minimal installs often have no cache at all, and some systems use dnsmasq or nscd instead.
- Step 1 — Open a terminal (
Ctrl + Alt + Ton Ubuntu) - Step 2 — Run the command for your DNS service (below)
- Step 3 — Check it worked:
resolvectl statisticsshould show a current cache size of 0
# Ubuntu, Fedora 33+ and other systemd-resolved systems
sudo resolvectl flush-caches
# Check: "Current Cache Size" should be 0
resolvectl statistics
# Older systemd (before version 239, e.g. Ubuntu 18.04)
sudo systemd-resolve --flush-caches
# dnsmasq
sudo systemctl restart dnsmasq
# nscd
sudo systemctl restart nscdNot sure which service you run? Run resolvectl status. If it lists your DNS servers, you use systemd-resolved. If the command is missing, or says it can't reach the resolve service, check systemctl status dnsmasq or systemctl status nscd.
How to Flush DNS in Google Chrome
Chrome keeps its own DNS cache, separate from your operating system's (see the cache layers above), so flush both. Here's how:
- Step 1 — Open a new tab in Chrome
- Step 2 — Type
chrome://net-internals/#dnsin the address bar and press Enter - Step 3 — Click the Clear host cache button
- Step 4 — Also go to
chrome://net-internals/#socketsand click Flush socket pools to close stale TCP connections that may still be using old IP addresses
For a full refresh, flush the operating system and Chrome. Chrome rebuilds its cache as you browse, so clearing it has no lasting effect on speed.
How to Flush DNS in Firefox, Edge, Safari and Others
Every Chromium browser has the same page under its own prefix; Firefox has its own, and Safari uses the Mac's cache:
| Browser | How to Clear DNS Cache |
|---|---|
| Microsoft Edge | edge://net-internals/#dns → Clear host cache, then edge://net-internals/#sockets → Flush socket pools |
| Firefox | about:networking#dns → Clear DNS Cache. Firefox keeps up to 3,200 names, for 60 seconds when the OS gives no TTL |
| Safari (Mac) | No DNS cache of its own: flush macOS (above). Develop → Empty Caches clears web pages, not DNS |
| Brave, Opera, Vivaldi | brave://net-internals/#dns, opera://net-internals/#dns or vivaldi://net-internals/#dns → Clear host cache |
How to Flush DNS on Android and iPhone
Phones have no flush command. Reconnecting does the job:
- Turn Airplane mode on, wait 10 seconds, and turn it off. The phone rebuilds its network connections and their DNS caches.
- Still stale? Restart the phone. On Android, also check Settings → Network & internet → Private DNS (on Samsung, Connections → More connection settings): a provider hostname set there answers every lookup, whatever the Wi-Fi uses.
- On Wi-Fi, the router's cache still applies, so restart the router too if one site keeps failing on every device.
How to Flush DNS on Your Router
Your home router also caches DNS responses for all devices on the network. If you have flushed the DNS cache on your computer and browser but still see stale records, the router cache may be the culprit.
Most consumer routers do not have a dedicated DNS flush command. The simplest way to clear the router's DNS cache is to restart it:
- Step 1 — Unplug your router's power cable (do not just press the reset button — that factory-resets the router)
- Step 2 — Wait about 30 seconds so it powers down fully
- Step 3 — Plug the power cable back in and wait 1-2 minutes for the router to fully boot
- Step 4 — Reconnect to Wi-Fi if needed and verify the issue is resolved
Routers that run dnsmasq, such as OpenWrt, can clear it over SSH with /etc/init.d/dnsmasq restart, without a full reboot.
For ongoing DNS trouble, set your router to a public resolver such as Cloudflare (1.1.1.1) or Google (8.8.8.8), so every device uses it. Our guide to fixing slow DNS lookups has the steps.
How to Verify Your DNS Cache Was Flushed
After flushing, check that the cache is empty, or that your system now resolves the new address:
# Windows: lists what's cached (only a few entries right after a flush)
ipconfig /displaydns
# Windows PowerShell: count cached entries
(Get-DnsClientCache).Count
# macOS: the address your Mac resolves now
dscacheutil -q host -a name example.com
# Linux (systemd-resolved): "Current Cache Size" should be 0
resolvectl statisticsThen try the site that was failing. To compare what your machine gets with what DNS really says, look the domain up with DNS Lookup.
To see whether the problem is your cache or the records themselves, run the domain through the DNS Propagation Checker: it asks 34 resolvers in 28 countries at once. If they all have the new address and you don't, your cache or resolver is behind.
What to Do If Flushing DNS Does Not Fix the Problem
Flushing fixes stale answers, but not every DNS problem is a stale answer. If the problem survives a flush of your device, browser and router:
- Switch DNS servers — your ISP's resolver may be down or returning old records. Try Cloudflare (1.1.1.1) or Google (8.8.8.8); our slow DNS lookup guide has the steps
- Check whether the site is down — the Website Down Checker opens it from 11 places. If it fails everywhere, it isn't your cache or your resolver
- Check the records — look up the domain's A, AAAA and CNAME records with DNS Lookup. If they point at the wrong IP, only the domain's owner can fix them
- Disconnect a VPN or proxy — VPNs send DNS through their own servers, which keep their own cache
- Check your hosts file —
C:\Windows\System32\drivers\etc\hostson Windows,/etc/hostson macOS and Linux. Remove entries for the affected domain - Give a recent change time — each resolver picks up a changed record when its old copy's TTL runs out: minutes for short TTLs, up to a day or two for long ones
Check your DNS records now
See every record straight from the domain's own nameservers, beside what Google and Cloudflare have cached, with the TTL left on each.
Sources
- ipconfig, Microsoft
- host_resolver_manager_job.cc (Chrome's DNS cache times), Chromium
- dnsmasq manual (default cache size), dnsmasq
Frequently Asked Questions
What does flushing DNS do?
Is it safe to flush DNS?
What is the flush DNS command for Windows?
What is the flush DNS command for Mac?
How do I flush DNS on Fedora?
How often should I flush DNS?
Why do I need to flush both the system and the browser?
Does flushing DNS make the internet faster?
Does restarting my computer flush DNS?
How do I flush DNS on my router?
Related Articles
Related Tools
DNS Lookup
Every DNS record from the domain's own nameservers, beside Google's and Cloudflare's cache
DNS Speed Test
Time Cloudflare 1.1.1.1, Google 8.8.8.8 and more public DNS servers from your own browser, against your current DNS, and find the fastest for you
Website Down Checker
Is it down for everyone or just you? Check any site from 11 places and your own connection, with a live screenshot



