Skip to content
How‑To Guides

How to Flush Your DNS Cache and Fix Browsing Problems

Knowing how to flush DNS cache is one of those small skills that quietly fixes a category of mysterious browsing problems. Here is the calm, complete walkthrough.

How to Flush Your DNS Cache and Fix Browsing Problems

Every now and again, a website refuses to load on your computer even though everyone else in the household can reach it without any trouble. Or a site that worked perfectly yesterday now redirects somewhere strange. Or you have changed a DNS setting somewhere and nothing seems to have actually taken effect. Each of those symptoms points to the same quiet culprit that a quick flush DNS cache step usually resolves — your device’s local DNS cache is showing you a stale answer, and the answer is to flush DNS cache and start over with clean entries. For a broader walkthrough, our Home Networking is a good next read.

The good news is that you can flush DNS cache on any operating system in about ten seconds once you know the command. The technique has not changed substantially in years, the commands are short, and the result is usually immediate. Most of the situations that genuinely require a cache flush resolve the moment you run the right line. The frustration comes entirely from not knowing which line to run on which platform.

This guide walks through everything I check when a friend says their browsing is acting weird and an obvious cache issue is the likely cause — what DNS caching actually does, when to flush it versus when not to bother, and the exact command or click path for every common platform in 2026. By the end you will have a clean, reliable reflex to reach for whenever DNS-related strangeness appears.

What DNS Caching Does and Why You Sometimes Need to Flush It

Whenever your device looks up a website name and gets back an address, it remembers that answer for a while so it does not have to ask again next time. The remembered answers live in a local DNS cache, and when those entries go stale the right response is to flush DNS cache so fresh lookups can take over. Caching itself and they save real time — every cached lookup is one less network round-trip your device has to make. Modern systems aggressively cache DNS results because the speed difference is genuinely noticeable across a busy browsing session. The need to flush DNS cache only arises when something has gone wrong with those cached answers.

The trade-off is that cached answers can become stale. If a website moves to a new server, your cached lookup still points at the old one until the cache expires. If you change DNS provider, every cached entry from the previous provider keeps responding until time passes. If a DNS record is corrupted by an error somewhere upstream, the bad answer sits in your cache until you actively replace it. In all of these cases, the local DNS cache is technically working as designed but it is showing you yesterday’s truth. The fix is to flush DNS cache and force your device to fetch fresh answers from the DNS server.

Caching happens at multiple layers, which is one reason cache problems can be confusing to diagnose. Your operating system has a cache. Your browser has its own cache that is often separate. Your router may have a cache. Each layer has its own expiry behaviour, and a stale entry at any one cache layer can produce the same symptom. According to internet engineering standards organisations, the layered nature of DNS caching is fundamental to how the system scales, but it does mean that the diagnostic exercise of “where exactly is the bad answer coming from” sometimes requires checking more than one place.

When to Flush DNS Cache and When Not to Bother

Flushing the DNS cache is not a routine maintenance task. Most days you should leave it alone. The cache is doing useful work, and flushing it forces every subsequent lookup to start from scratch, which is slower until the cache rebuilds. Reach for the flush DNS cache technique deliberately when one of the recognisable triggers is present.

Common situations where it makes sense to flush DNS cache:

  • You just changed your DNS server and want every lookup to start using the new resolver immediately. Our walkthrough on changing your DNS server covers the configuration side; flushing the cache is the natural follow-up that makes the change take full effect.
  • A website you know is online refuses to load on your device specifically while loading fine elsewhere. The local cache likely holds a bad entry.
  • A website you maintain has moved to a new server and your test browser still hits the old one. Flushing forces a fresh lookup that picks up the new record.
  • You suspect DNS spoofing or tampering. Clearing the cache removes any cached malicious entries, though it does not address the underlying compromise if one exists.
  • Browsing behaviour is genuinely strange — redirects to unexpected places, sites loading with the wrong domain, certificate errors that should not be there. A cache flush is a cheap first step before more involved troubleshooting.

It is worth understanding what does not need a cache flush. Day-to-day browsing problems — a video buffering, a download stalling, a page rendering oddly — are almost never DNS-related. The cache only sits in the lookup path; it is not involved in actually transferring data once the address has been resolved. If you can reach a site at all, even slowly, the DNS lookup succeeded and the cache is doing its job. Save the technique for situations where the symptom genuinely fits a stale-lookup pattern.

If none of those situations apply, leave the cache alone. Flushing it casually does not improve speed or security; it simply forces the system to do work it had already done. Reach for the flush DNS cache step when a specific symptom suggests stale data, not as a general-purpose habit.

How to Flush DNS Cache on Windows 11

Windows 11 makes the process straightforward through Command Prompt or PowerShell. The command has not changed in years, which is helpful when you are working on a machine you do not own and need to remember the syntax.

Open Command Prompt as administrator — right-click the Start button, select “Terminal (Admin)” or “Command Prompt (Admin),” and confirm the prompt. Then type the following command and press Enter:

ipconfig /flushdns

That is the whole flush DNS cache command. Windows will respond with “Successfully flushed the DNS Resolver Cache” and the operation is complete. New lookups will go out to your configured DNS server fresh, and previously cached answers are gone. Browser caches are separate, though — if your browser is also caching the same domain, you may need to clear its DNS cache too. Most browsers offer this in their developer tools or in a hidden settings page like chrome://net-internals/#dns for Chrome-based browsers.

Quick tip — if you have just changed DNS settings and want to be thorough, restart the DNS Client service in addition to the flush. Open services.msc, find DNS Client, and restart it. This clears any in-memory state that the simple flush command might miss. It is rarely necessary but it is the most thorough version of the technique on Windows.

If the flush DNS cache command refuses to run with a “permission denied” error, the prompt was not opened as administrator. Close it and reopen with elevated privileges. The flush requires admin rights because the DNS cache is a system-level resource shared across every user on the machine.

How to Flush DNS Cache on Mac, Linux, iOS, and Android

The command on macOS varies slightly by version but the structure is consistent. Open Terminal — found in Applications, Utilities — and run the following command:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

You will be asked for your administrator password. The command flushes the system cache and restarts the resolver process in one go, which is the most reliable approach on modern macOS. The terminal does not print a confirmation message — the lack of an error is the success signal — and new lookups start using fresh data immediately.

On Linux, the right command depends on which resolver your distribution uses. For systemd-based distributions (most modern Ubuntu, Fedora, Debian variants), the command is sudo systemd-resolve --flush-caches or, on newer systems, sudo resolvectl flush-caches. If your system uses nscd, the equivalent is sudo systemctl restart nscd. If neither tool is installed, your distribution may not be caching DNS at the OS level at all, in which case there is nothing to flush — the browser is the only place caching is happening.

On iOS and Android, there is no user-accessible flush command. The fastest way to flush DNS cache on mobile is to toggle Airplane Mode on and off, or to disconnect and reconnect from Wi-Fi. Both actions force the network stack to reinitialise, which effectively clears the cached entries. A full device restart accomplishes the same thing and is sometimes the cleanest option when you have just changed network settings.

Platform Command or Action
Windows 11 ipconfig /flushdns (admin prompt)
macOS sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Linux (systemd) sudo resolvectl flush-caches
iOS Toggle Airplane Mode or restart the device
Android Toggle Wi-Fi or restart the device
Chrome browser Visit chrome://net-internals/#dns and click Clear host cache
Firefox browser Visit about:networking#dns and click Clear DNS Cache

Browser-level caches deserve their own line in the table because they operate independently of the operating system’s cache. A site that still misbehaves after you flush DNS cache at the system level may still have a stale entry in your browser. Running the browser-level clear is the natural complement, and it is genuinely worth knowing both options exist.

One useful diagnostic before reaching for any command-line tool: try the same site on a different browser on the same machine. If it works in the second browser, the issue is browser-level rather than system-level, and the OS-wide flush will not help. If it fails in both browsers, the system cache or something further upstream is the cause, and the system-level technique is appropriate. This twenty-second test prevents a lot of confused troubleshooting and points immediately at the right layer to investigate.

What to Do If Flushing the Cache Does Not Solve the Problem

Sometimes you flush DNS cache and the symptom persists. This is informative — the cache was not the cause, and the real issue lies somewhere else. A few patterns are worth recognising before reaching for the next tool.

If the problem persists across multiple devices on the same network, the issue is upstream rather than local. The DNS server itself may be returning bad answers, the router may be caching at its level, or the upstream provider may have a regional issue. Try a different DNS server temporarily — Cloudflare’s 1.1.1.1 or Google’s 8.8.8.8 — and see whether the problem clears. If it does, the original resolver was the cause. Our companion walkthrough on changing your DNS server covers the longer-term fix.

If the problem happens only on one device, even after you flush DNS cache and try a different network, something local is misconfigured. Browser extensions, VPN clients, or security software with traffic inspection can all interfere with DNS resolution in ways that look like cache problems. Disable each one in turn to find the culprit. Reviews from outlets like major technology publications regularly note that browser-extension interference now accounts for a meaningful share of mysterious browsing issues that users initially attribute to DNS.

If certificate errors are involved, the problem is probably not something a flush DNS cache step can fix. A site loading with the wrong certificate usually means traffic is being intercepted somewhere — by your network, by a captive portal on guest Wi-Fi, or by something more concerning. Cache flushing will not address an interception scenario. For broader connectivity diagnosis when a flush does not help, our guides on DNS server not responding and no internet after a Windows 11 update cover related issues that often present similarly.

The diagnostic value of a cache flush goes beyond just fixing the symptom in front of you. If a single device behaves oddly while every other device on the same network works fine, the local DNS cache is one of the few places where per-device state can diverge from network-wide reality. A targeted flush DNS cache step therefore acts as both a fix and a test — if the symptom clears, the cache was the culprit; if it persists, you have ruled out the cache and can focus on layers further down the stack.

Smart Habits Around DNS Cache Maintenance

Flushing the DNS cache is a small enough operation that it does not really need a maintenance schedule. What does matter is recognising the situations where the technique helps and reaching for it instinctively in those moments. A few habits make that recognition more reliable.

Pair every DNS configuration change with an immediate flush DNS cache step. Whenever you switch resolver, change DNS settings on a router, or update an internal DNS record, run the flush command before doing anything else. This ensures the change actually takes effect rather than being masked by stale cached entries. The two-second flush DNS cache step turns minutes of confused troubleshooting into a clean transition.

Keep a small cheat sheet of the commands for each platform you regularly use. A note in a password manager — our roundup of the best password manager options covers good 2026 picks — works perfectly for this kind of reference. The commands are short enough to memorise eventually, but the cheat sheet ensures you do not waste time looking them up when something is broken and you need to flush DNS cache quickly.

Remember that the DNS cache is a feature, not a bug, and the right time to flush DNS cache is when symptoms genuinely call for it. Most days it speeds up your browsing meaningfully and you would not want to disable it. The point of knowing how to flush DNS cache is not to do it constantly; it is to have the tool ready for the specific moments when it helps. For broader network health practices that work alongside DNS hygiene, our companion walkthrough on securing your home WiFi network covers the maintenance habits that keep the whole stack predictable.

Nikolas Lamprou

Nikolas Lamprou (MSc; GCFR, SC-200, Security+) has been working with computers professionally since 2009 — starting with web development and e-commerce, and moving into cybersecurity over the years. Based in Greece, he brings over 15 years of real-world IT experience to SolveTechToday, where he writes about Windows fixes, software reviews, security tools, and AI applications. His goal is straightforward: cut through the noise and give readers clear, honest guidance on the tech decisions that matter.

Stay Ahead

Fix your next problem before it starts

Get the week's best Windows fixes, software picks, and security guides delivered straight to your inbox. No noise, just solutions.

Press ESC to close · Try "Windows 11" or "Chrome"