HostVitals by Zrina
← Back to Status Checker
Troubleshooting Guide

How to Flush Your Local DNS Cache on Windows, macOS, Linux & Mobile

Need to clear a local DNS cache? Choose your device for the steps. On Windows, open Command Prompt and run ipconfig /flushdns. Clearing a cache may help with stale DNS records, but it does not repair a server outage or change your DNS provider.

When you type a domain name like perplexity.ai or github.com into your browser, your operating system does not query global DNS servers every single time. Instead, it saves recently resolved IP addresses in a temporary local database known as the DNS Resolver Cache.

While caching makes everyday web browsing significantly faster, it creates a common problem: if a website migrates to a new server IP, switches CDN providers, or recovers from a temporary DNS misconfiguration, your computer may continue trying to connect to the old, dead IP address until the cached record's Time-To-Live (TTL) expires.

When might flushing DNS help? If the HostVitals edge probe (or a public gateway fallback) receives a response but your browser cannot load the site, a local DNS or network issue is one possible cause. HostVitals cannot identify the cause on its own; compare the result with another network or resolver before changing settings.

1. Flush DNS Cache on Windows 10 & Windows 11

On Windows, the DNS Client service manages cached domain records. You can clear it in seconds using Command Prompt, PowerShell, or Windows Terminal:

  1. Press Win + R, type cmd, and press Enter.
  2. Type the following command and press Enter:
ipconfig /flushdns

If the command succeeds, Windows displays a confirmation. If it reports an error, check the message before proceeding.

2. Flush DNS Cache on macOS

On recent macOS releases, open the Terminal app (via Spotlight Cmd + Space) and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your Mac login password when prompted (characters will not appear as you type) and press Return.

3. Flush DNS Cache on Linux

If your system uses systemd-resolved, open a terminal and run:

sudo resolvectl flush-caches

Other systems may use a different local resolver or no local DNS cache. Check which service is running before changing it; service restarts can affect other users or network services.

4. Clear the browser's DNS cache

Chrome maintains its own host cache, separate from the operating system. Browser interfaces can change; the following steps are for Chrome:

  1. Open a new tab and paste the following internal address into the URL bar:
chrome://net-internals/#dns
  1. Click the "Clear host cache" button.

Edge and Brave have their own internal pages; check your browser's current documentation. Clearing Chrome's host cache does not necessarily close existing connections. Flushing socket pools is a separate troubleshooting step that may interrupt active connections.

5. DNS troubleshooting on iPhone, iPad and Android

Mobile devices do not offer a universal DNS-flush command in their standard settings. Try the following network troubleshooting steps instead:

What to check next

Reload the site after the cache is cleared. If it still fails, compare another browser or network and check whether your resolver or network administrator reports an issue. A server outage, firewall, VPN or browser connection problem will not necessarily be fixed by flushing DNS.

Use HostVitals to compare browser, edge and DNS observations. A difference between checks can guide your next step, but is not proof of the cause or a global outage.

Reference: Microsoft's ipconfig documentation describes the Windows /flushdns option.