How to Flush DNS Cache (Windows, macOS, Linux, Browsers)
If a website suddenly won’t load, keeps redirecting to the wrong page, or shows an old version of a site you know has been updated, your computer’s DNS cache might be the problem. Learning how to flush DNS cache (also called clearing your DNS cache) is one of the fastest fixes for these issues, and it takes less than a minute on any device. This guide covers the exact steps for Windows, macOS, Linux, Chrome, and mobile devices.
What Is DNS Cache, and What Does Flushing It Do?
Every time you visit a website, your device looks up the site’s domain name and translates it into an IP address through the Domain Name System (DNS). To save time on future visits, your computer stores that translation locally in something called the DNS cache.
The problem is that cached DNS records can become outdated or corrupted. If a website changes servers, moves to a new host, or updates its security certificate, your device may keep using the old, cached information instead of fetching the current details. Flushing DNS simply clears out that stored information, forcing your device to look up fresh records the next time you visit a site.
When You Should Flush DNS
Flushing DNS can help resolve:
- Websites that won’t load, even though they’re up for everyone else
- “This site can’t be reached” or DNS error messages
- Being redirected to the wrong website or an old version of a site
- Issues right after switching internet providers, VPNs, or DNS servers
- Problems accessing a site after you or your web host recently made changes to it
How to Flush DNS on Windows (The ipconfig /flushdns Command)
The flush DNS command on Windows is run at a command prompt, and it works the same way on Windows 10 and Windows 11.
- Open the Start Menu and type
cmd. - Right-click Command Prompt and select Run as administrator.
- Type the following command and press Enter:
ipconfig /flushdns
- You should see a confirmation message: “Successfully flushed the DNS Resolver Cache.”

You might see this same command written a few different ways — ipconfig/flushdns (no space), ipconfig flushdns (no slash), or just flushdns/dnsflush. They all refer to the exact same command; Windows only recognizes the version with a space and forward slash: ipconfig /flushdns.
If you’re still having connection issues afterward, you can also reset your IP configuration with these two follow-up commands:
ipconfig /release
ipconfig /renew
A couple of other useful commands while you’re at it:
- To view your current DNS cache:
ipconfig /displaydns - To fully reset your network stack (helpful for stubborn connection issues):
netsh winsock reset
How to Flush DNS on macOS
The command varies slightly depending on your macOS version.
macOS Monterey, Ventura, Sonoma, and later:
- Open Spotlight Search (Cmd + Space) and type
Terminal. - Enter the following command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your Mac’s password when prompted (it won’t show characters as you type, this is normal).
Older macOS versions (Yosemite, El Capitan, Sierra):
sudo killall -HUP mDNSResponder
If you’re not sure which version you’re running, check under the Apple menu > About This Mac, and use the command that matches.
How to Flush DNS on Linux
The command depends on which DNS resolution service your distribution uses.
If you’re using systemd-resolved (common on Ubuntu, Fedora, and most modern distros):
sudo systemd-resolve --flush-caches
On Ubuntu specifically, if the above doesn’t apply, you can also restart Network Manager:
sudo service network-manager restart
This restarts the Network Manager service, which refreshes your DNS settings and ensures your system uses the most up-to-date records.
If you’re using nscd:
sudo /etc/init.d/nscd restart
If you’re using dnsmasq:
sudo /etc/init.d/dnsmasq restart
Not sure which one applies to you? Run systemctl status systemd-resolved first — if it’s active, use the first command.
How to Clear DNS Cache in Chrome, Firefox, and Edge
Browsers keep their own separate DNS cache on top of your operating system’s cache, so clearing your OS cache alone doesn’t always solve browser-specific loading issues. Here’s how to clear DNS cache in each major browser.
Google Chrome:
- Open Chrome and go to:
chrome://net-internals/#dns - Click Clear host cache.
You can also clear Chrome’s broader socket cache for good measure:
- Go to
chrome://net-internals/#sockets - Click Flush socket pools.
Mozilla Firefox:
- Open Firefox and go to Settings > Privacy & Security.
- Scroll to Cookies and Site Data and click Clear Data.
- Check Cached Web Content and click Clear.
Microsoft Edge:
- Open Edge and go to Settings > Privacy, search, and services.
- Under Clear browsing data, click Choose what to clear.
- Select Cached images and files and click Clear now.
How to Flush DNS on Android
- Open Settings.
- Go to Apps > Chrome (or your default browser).
- Tap Storage and then Clear Cache.
Android doesn’t have a dedicated system-wide DNS flush command like desktop operating systems, so clearing your browser cache and toggling Airplane Mode on and off (which resets your network connection) is usually the most effective fix.
How to Flush DNS on iPhone or iPad
iOS doesn’t provide a manual DNS flush option either. Instead:
- Turn on Airplane Mode under Settings.
- Wait about 15-30 seconds.
- Turn Airplane Mode back off.
This resets your device’s network connection, which clears its temporary DNS cache in the process.
Quick Cheat Sheet for Flushing DNS
| Platform | Command / Action |
|---|---|
| Windows 10/11 | ipconfig /flushdns |
| macOS | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Linux (systemd) | sudo systemd-resolve --flush-caches |
| Ubuntu (Network Manager) | sudo service network-manager restart |
| Chrome | chrome://net-internals/#dns → Clear host cache |
Still Having Issues After Flushing DNS?
If flushing DNS doesn’t fix the problem, try these next steps:
- Restart your router. Unplug it for 30 seconds, then plug it back in.
- Switch your DNS server. Public DNS servers like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1) are often faster and more reliable than your ISP’s default.
- Clear your browser’s cache and cookies, not just its DNS cache, since old page data can also cause loading issues.
- Check if the site is down for everyone, not just you, using a service like downdetector.com.
Frequently Asked Questions
What does flush DNS mean? Flushing DNS clears the stored DNS records (the cached IP addresses of websites) on your computer. This forces your system to look up fresh DNS information the next time you visit a site.
Is it safe to flush DNS? Yes. Flushing DNS is completely safe — it doesn’t affect your files, apps, or system settings. It only removes outdated or corrupted DNS entries, which get rebuilt automatically as you keep browsing.
Will restarting my computer flush DNS? Not always. A restart may clear some temporary cache, but the DNS resolver cache often persists across reboots until you explicitly run the flush command for your operating system.
Does flushing DNS speed up my internet? Not directly. It won’t make your connection faster, but it fixes errors caused by old or corrupted DNS records, which can make sites load correctly again.
How often should I flush DNS? Only when you actually run into a problem — like a site not loading, DNS errors, or issues right after switching networks, VPNs, or DNS servers. There’s no need to do it on a regular schedule.
What is DNS cache? DNS cache is a small local database your device keeps of recently visited websites and their IP addresses. It’s what lets your computer skip a full DNS lookup on repeat visits, which speeds up browsing — but it can also hold onto outdated or incorrect information.
Is “flush DNS” the same as “clear DNS cache”? Yes, they’re two names for the same action. “Flush DNS,” “clear DNS cache,” and “DNS cache flush” all refer to deleting your device’s stored DNS records so it fetches fresh ones.
Is DNS refresh the same as flushing DNS? Not quite. “DNS refresh” usually refers to your device automatically requesting updated records once a cached entry’s TTL (time to live) expires. Flushing DNS forces that refresh manually and immediately, instead of waiting for the TTL to run out.
Final Thoughts
Flushing DNS is a quick, low-risk fix that solves a surprising number of everyday browsing problems, from broken websites to stubborn redirects. Whether you’re on Windows, Mac, Linux, or mobile, the process takes less than a minute and can save you a lot of troubleshooting time down the road.