2026-07-086 min de lectura

How to Flush DNS Cache on Windows and Mac (2 Ways)

Copy-Paste Commands for Both Systems, Plus a No-Terminal Option

To flush the DNS cache on Windows, open Command Prompt and run ipconfig /flushdns. On a Mac, open Terminal and run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. Both commands finish in about a second and clear every stored DNS entry, forcing your computer to look up fresh addresses the next time you open a website.

That is the short answer, and for most people it is genuinely all you need. In this guide we'll walk through both commands step by step, explain what flushing DNS actually does, show a one-click alternative for anyone who would rather not touch a terminal, and be honest about which connection problems a DNS flush cannot solve.

What the DNS Cache Does and When to Flush It

DNS (Domain Name System) is the internet's address book: it translates a name like example.com into the numeric IP address your computer actually connects to. To avoid repeating that lookup for every page load, your operating system keeps a local DNS cache — a small database of recently resolved names and their addresses. Cached lookups are one of the reasons sites you visit often reconnect so quickly.

So what does flushing DNS do? It simply empties that local database. Nothing gets uninstalled and no settings change; your system just performs fresh lookups from your DNS server the next time each site is requested. The first visit after a flush may take a fraction of a second longer, and then everything behaves exactly as before.

Flushing is worth trying when a website recently moved to a new server and you still land on the old one, when a site loads on your phone but not on your computer, after you change DNS providers, or when your browser shows errors like DNS_PROBE_FINISHED_NXDOMAIN. It is also a small privacy win: on Windows, anyone at your keyboard can list recently visited domains with ipconfig /displaydns, and a flush wipes that list.

Flush DNS on Windows 10 and 11 with ipconfig /flushdns

On Windows 11, right-click the Start button and choose Terminal; on Windows 10, press the Windows key, type cmd, and open Command Prompt. You do not need administrator rights for this command. In the window that appears, type ipconfig /flushdns and press Enter.

Windows responds with the message Successfully flushed the DNS Resolver Cache. That is the entire operation — no restart, no downtime, and it is completely safe to repeat as often as you like. If you prefer PowerShell, the equivalent command is Clear-DnsClientCache, which does exactly the same thing.

Two related commands are worth knowing. ipconfig /displaydns prints the current contents of the cache, which is useful for checking whether a stubborn entry is really gone. And if you suspect a deeper network issue, running ipconfig /release followed by ipconfig /renew refreshes your IP address lease as well — a common companion step when troubleshooting connection problems on Windows 11.

Flush DNS on macOS via Terminal

To clear the DNS cache on a Mac, open Terminal — press Command and Space, type Terminal and hit Return, or find it under Applications, then Utilities. Paste this single line and press Return: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. The same command works on macOS 12 Monterey and every later version.

Because the command starts with sudo, macOS asks for your administrator password. Type it and press Return — no characters appear while you type, which is normal Terminal behavior, not a frozen window. Unlike Windows, macOS prints no confirmation message: the command simply returns to the prompt, and the cache is gone.

The two halves of the command do different jobs: dscacheutil -flushcache empties the directory service cache, while killall -HUP mDNSResponder tells the process that handles DNS lookups to reload. Running them together is the widely recommended way to make sure stale entries are fully cleared on a modern Mac.

Flush Your DNS Cache Without the Terminal

The commands above are free, fast, and built into both operating systems — if you are comfortable with a command line, you genuinely do not need anything else. But plenty of people are not, and there is no reason a routine maintenance task should require memorizing syntax or typing sudo into a window that gives no feedback.

Disk Mop includes a DNS Cache Cleaner that does the same job with a single click, on both Windows 10/11 and macOS 12 and later. Open the app, choose DNS Cache Cleaner, click once — no commands to remember, nothing to mistype, and the exact same result as the terminal method.

The convenience compounds because a DNS flush rarely happens in isolation. When you are troubleshooting, you usually want to clear browser caches too, and Disk Mop keeps both tools side by side in the same interface. There is a free version with limited features, and the Pro license is a one-time $9.90 payment with no subscription.

Also Clear the Browser Cache When Pages Misbehave

Your operating system's DNS cache is not the only cache between you and a website. Chrome maintains its own internal DNS cache: type chrome://net-internals/#dns into the address bar and click Clear host cache to empty it. Browsers also store copies of pages, images, and scripts, so even after a successful DNS flush you may still see an outdated or broken version of a site.

To clear the regular browser cache in Chrome, Edge, or Firefox, press Ctrl+Shift+Delete (Command+Shift+Delete on a Mac), select cached images and files, and confirm. In Safari, enable the Develop menu under Settings, Advanced, then choose Empty Caches from the Develop menu. Doing this alongside a DNS flush covers both layers where stale data can hide.

Disk Mop's Browser Cache Cleaner handles Chrome, Firefox, Edge, and Safari from one screen, so you can clear every browser's cache in a single pass instead of repeating keyboard shortcuts in each one. Combined with the DNS Cache Cleaner, it turns the classic have-you-tried-clearing-your-cache routine into two clicks.

When Flushing DNS Won't Fix Your Problem

An honest scope note: flushing DNS fixes stale name lookups on your computer, and nothing else. If the website itself is down, if your Wi-Fi keeps dropping, or if your internet provider is having an outage, a DNS flush will not help. It also will not make everyday browsing measurably faster — the cache exists to speed things up, so clearing it is a troubleshooting step, not a performance tweak.

Your router keeps its own DNS cache too, one layer beyond your computer's reach. If a flush does not help, restart the router and see whether the problem clears. Persistent DNS_PROBE_FINISHED errors often mean the DNS server you are using is struggling; switching your network settings to a public resolver such as 1.1.1.1 or 8.8.8.8 fixes this more often than repeated flushing does.

Finally, if a device works on one network but not another, or every browser fails while other apps stay online, the problem is more likely firewall, VPN, or proxy configuration than DNS caching. Flushing is a free, zero-risk first step — just do not stop there when the symptoms point elsewhere.

Veredicto

Flushing your DNS cache takes one command: ipconfig /flushdns on Windows, or sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on a Mac. It is safe, instant, and the right first move when a website resolves incorrectly, shows DNS errors, or refuses to load on one machine only.

If you would rather never open a terminal, Disk Mop wraps the same operation in a single click and pairs it with a Browser Cache Cleaner for Chrome, Firefox, Edge, and Safari — the two tools you usually need together. It runs on Windows 10/11 and macOS 12+, and a lifetime Pro license is a one-time $9.90 with no subscription.

Flush your DNS cache in one click with Disk Mop

Pago único para acceso de por vida a todas las funciones. Sin suscripción, sin tarifas ocultas.

Descarga Disk Mop ahora

Artículos relacionados