Flush DNS Commands: Every OS, One Complete Reference
The single page to bookmark — every DNS flush command across every major platform and browser, in one place.
This is the consolidated command reference behind our platform-specific guides — every DNS flush command you're likely to need across Windows, macOS, Linux, and the major browsers, gathered in one place with what each one actually does.
- Introduction
- Windows
- macOS
- Linux
- Chrome & Edge
- Firefox
- When You Actually Need to Flush
- When Flushing Won't Help
- Recommended Order of Operations
- Scripting Flushes for Multiple Machines
- Master Command Table
- Enterprise Use
- Common Mistakes
- Full Reference Checklist
- Expert Tips
- Daily Practical Use Cases
- Glossary
- FAQ
📝 Introduction
Every operating system and most browsers maintain their own independent DNS cache, and each one has its own specific command to clear it — there's no universal "flush DNS" command that works everywhere. This reference consolidates all of them, cross-linking to our deeper platform-specific guides for anyone who wants the fuller explanation behind each command.
🖥️ Windows
Open Command Prompt and run ipconfig /flushdns to clear the entire local DNS cache. View current cache contents beforehand with ipconfig /displaydns. See our full Windows DNS Cache guide for the DNS Client service architecture behind these commands, plus PowerShell equivalents.
🍑 macOS
Open Terminal and run sudo dscacheutil -flushcache followed by sudo killall -HUP mDNSResponder, entering your administrator password when prompted. See our full macOS DNS Cache guide for why this two-part command is necessary and how it's changed across macOS versions.
📶 Linux
The command depends on your active resolver: sudo resolvectl flush-caches for systemd-resolved, a service restart for nscd or dnsmasq if either is active instead, or potentially nothing to flush at all if your system runs no local caching resolver. See our full Linux DNS Cache guide for identifying which stack your specific distribution is running.
🌐 Chrome & Edge
Navigate to chrome://net-internals/#dns (or edge://net-internals/#dns on Edge) and use the built-in "Clear host cache" button, since both Chromium-based browsers expose this dedicated diagnostic page directly.
🍱 Firefox
Firefox doesn't expose as detailed a dedicated cache-clearing page — a full browser restart is the most reliable way to clear its internal DNS cache, since it's held in memory and not persisted across sessions.
✅ When You Actually Need to Flush
Flushing is genuinely useful after a DNS record change you've made yourself, after connecting or disconnecting a VPN, when troubleshooting a "works elsewhere but not here" symptom, or as a standard early step in broader connectivity troubleshooting. See our Prevent DNS Leaks guide for VPN-specific scenarios where a flush is a useful part of a larger checklist.
❌ When Flushing Won't Help
Flushing your local cache cannot fix a website that's genuinely down for everyone, a DNS misconfiguration on the domain owner's authoritative nameservers, or a change that hasn't yet been made at the source — in all of these cases, the problem exists upstream of your local cache entirely, and flushing changes nothing about it.
🔄 Recommended Order of Operations
Confirm the Issue Is Actually Local
Check whether the domain resolves correctly from another device or network first.
Flush the OS-Level Cache
Clears the system-wide cache affecting every application at once.
Flush or Restart the Browser
Addresses the separate browser-level cache layer independently.
Re-test
Confirm the change is now visible before considering the issue resolved.
💻 Scripting Flushes for Multiple Machines
IT teams managing several machines can script flush commands for remote or bulk execution — PowerShell's Clear-DnsClientCache on Windows, or configuration management tools like Ansible running the appropriate platform-specific command across a mixed Linux and macOS fleet — rather than requiring manual execution on each device individually.
📊 Master Command Table
| Platform | Command |
|---|---|
| Windows | ipconfig /flushdns |
| macOS | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Linux (systemd-resolved) | sudo resolvectl flush-caches |
| Linux (nscd) | sudo service nscd restart |
| Chrome/Edge | chrome://net-internals/#dns (or edge://) |
| Firefox | Restart the browser |
🏢 Enterprise Use
Organizations should maintain this kind of consolidated command reference as part of their internal IT documentation, version-specific where relevant, so support staff aren't searching for the correct syntax mid-incident across a mixed fleet of operating systems and browser versions.
❌ Common Mistakes
✅ Full Reference Checklist
- Confirm the issue is actually local before flushing anything
- Flush the OS-level cache using the correct platform command
- Address the browser-level cache separately
- Re-test to confirm before considering the issue resolved
🎓 Expert Tips
💼 Daily Practical Use Cases
Support engineers keep this reference on hand for cross-platform troubleshooting during customer-facing tickets. Developers switching between operating systems for testing use it to avoid mixing up platform-specific syntax. IT teams incorporate it directly into onboarding and incident-response documentation for their organization.
📚 Glossary
| Term | Definition |
|---|---|
| DNS Flush | Clearing a device or browser's locally cached DNS records |
| Local Cache | A DNS cache scoped to a single device or application, not shared network-wide |
ToolsNovaHub tools are built and independently maintained with a focus on accurate, no-signup network and security utilities. Spotted an error? Let us know.
📋 Related Tools & Guides Comparison
| Resource | Type | Link |
|---|---|---|
| DNS Cache Checker | Tool | Open Tool → |
| Browser DNS Cache | Guide | Read Guide → |
| Windows DNS Cache | Guide | Read Guide → |
| Linux DNS Cache | Guide | Read Guide → |
| macOS DNS Cache | Guide | Read Guide → |