How to Flush DNS Cache — Windows, Mac & Linux (2026)
Last updated: June 6, 2026
When you visit a website, your computer remembers its IP address so it doesn't have to look it up again. This is called DNS caching. Usually it speeds things up — but when a website moves servers, changes its configuration, or recovers from an outage, your cached DNS can point to the wrong address. Flushing (clearing) your DNS cache forces your computer to look up the correct address fresh.
When Should You Flush Your DNS?
- A website works on your phone but not on your computer
- You get "This site can't be reached" or "DNS_PROBE_FINISHED_NXDOMAIN" errors
- A website was down earlier and now others say it's back, but you still can't access it
- You recently changed your DNS server settings
- You're a developer who just changed DNS records for a domain
Windows 10 / Windows 11
Press Windows + R, type cmd and press Enter. Or right-click the Start button and select "Terminal" or "Windows PowerShell".
Type the following and press Enter:
ipconfig /flushdns
You should see: "Successfully flushed the DNS Resolver Cache."
Chrome maintains its own DNS cache separate from Windows. Open Chrome and go to:
chrome://net-internals/#dns
Click "Clear host cache". Then go to:
chrome://net-internals/#sockets
Click "Flush socket pools".
macOS
Press Cmd + Space to open Spotlight, type Terminal, and press Enter.
Type the following and press Enter (you'll need to enter your Mac password):
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
There's no confirmation message — if you don't see an error, it worked.
Linux (Ubuntu, Debian, Fedora, etc.)
Linux DNS caching depends on which service is running. Here are the most common ones:
sudo systemd-resolve --flush-caches
Or on newer versions:
sudo resolvectl flush-caches
sudo systemctl restart nscd
sudo systemctl restart dnsmasq
Android
The simplest way to flush DNS on Android: turn Airplane Mode on, wait 10 seconds, then turn it off. This clears the DNS cache and reconnects to the network.
Open Chrome, go to chrome://net-internals/#dns and tap "Clear host cache".
iPhone / iPad
Open Settings → toggle Airplane Mode on. Wait 10 seconds, then toggle it off. This clears iOS's DNS cache.
A full restart also clears the DNS cache. Hold the power button → Slide to power off → Wait → Turn back on.
Verify It Worked
After flushing your DNS, verify the domain resolves correctly:
In Command Prompt (Windows) or Terminal (Mac/Linux), type:
nslookup example.com
Replace example.com with the website you're trying to reach. If it returns an IP address, DNS is working. If it shows an error, the issue might be with your DNS server — try switching to a public DNS.
Still having trouble accessing a website?
Check if the site is down for everyone or just you.
Check Website Status