How to flush DNS: A complete guide for privacy and speed
Learn how to flush DNS on Windows, Mac, Linux, iPhone, and Android. Improve speed, fix errors, and strengthen privacy with VPN leak protection.

Share
If your internet suddenly feels sluggish, pages don’t load correctly, or you keep getting redirected to the wrong site, the issue may not be your browser or Wi-Fi, it could be your DNS cache. Performing a DNS flush is one of the easiest ways to clear outdated records, restore proper connections, and even strengthen your digital privacy.
In this guide, you’ll learn exactly how to flush DNS on Windows, Mac, Linux, iPhone, and Android, plus why it matters for your online privacy. We’ll also explain how tools like NymVPN take protection a step further by securing your DNS traffic against surveillance and leaks.

How to flush DNS on different devices
- Open the Start menu, search for Command Prompt, right-click and choose Run as Administrator
- Type ipconfig /flushdns.
- You should see confirmation that the cache was cleared. macOS
- Open Terminal and enter: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- You won’t see a message, but the cache is flushed.
- Enter: sudo systemd-resolve --flush-caches
- Check with: systemd-resolve --statistics
Other distributions may use nscd or dnsmasq.
The quickest method is toggling Airplane Mode off and on, or simply restarting your device.
You can also clear Safari’s browsing history in Settings > Safari.
Android
- Restart your phone or toggle Airplane Mode.
On some devices, clearing browser cache or resetting network settings also flushes DNS.
If you want a more thorough reset, see our guide on Android factory resets.
Nym's Noise Generating Mixnet
DNS flushing: FAQs
It can fix misdirected queries caused by DNS tampering, but it won’t stop network-level censorship. Using tools like VPNs or mixnets is essential for bypassing restrictions.
No. A flush clears cache entries, which may remove malicious redirects, but it won’t eliminate malware on your system. You’ll need dedicated security tools.
On mobile devices, DNS flushing usually happens through reboots or toggling Airplane Mode. Desktops require commands or Terminal, making the process more deliberate.
Yes. Flushing only clears your local cache. Employers monitoring workplace networks can still view live DNS lookups unless you use encryption and VPN protection.
You may not notice at first, but cached data can cause connection errors over time, enable spoofing attacks, and leave behind traces of browsing history that compromise privacy.
About the authors

Benjamin Nemeroff

Casey Ford. PhD
Technical reviewerTable of contents
Keep Reading...
DNS server not responding? How to fix it on any device
Learn what causes DNS errors, how to fix them fast, and how to protect your DNS traffic with privacy tools

Nym is more than a VPN
The first app that protects you from AI surveillance thanks to a noise-generating mixnet

Can you be tracked while using a VPN?
VPNs are great privacy tools, but you can still be tracked. Choose the right type of VPN to avoid it.
