Glossary / DNS basics
Flush DNS cache
Flushing the DNS cache deletes the DNS answers your device has stored, so the next visit to a site triggers a fresh lookup. Use it after a domain's records change and your computer still reaches the old server. It clears only your device's cache, not your ISP's or a public resolver's.
Copy the syntax
Windows (Command Prompt)
ipconfig /flushdnsWindows replies: Successfully flushed the DNS Resolver Cache.
macOS (Terminal)
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderAsks for your password. Prints nothing when it works.
Have a name in mind?
.com $24.99 first year, renews at $24.99/yr. Other endings: not on sale yet.
In plain English
Your computer remembers DNS answers for a while. Flushing makes it forget, so it looks the name up fresh.
What to do
- Run the flush command for your system after a DNS change.
- Test against a public resolver if the old site still shows.
- Wait out the old record's TTL if other people still see the old site.
- Windows command
- ipconfig /flushdnsSource: Microsoft Learn
- Linux (systemd-resolved)
- resolvectl flush-cachesSource: systemd docs
- Why caches exist
- Resolvers keep answers for the record's TTLSource: RFC 1035
When should I flush DNS?
Flush DNS when a site you just moved still loads the old server on your machine, or when a name that now resolves still fails for you. It is also a quick first step when a page throws a name-not-resolved error that friends on other networks do not see.
Flushing does not speed up a change for everyone else. Other people keep their cached answers until the old record’s TTL expires.
What does ipconfig /flushdns do?
ipconfig /flushdns empties the Windows DNS Client cache. The next request for any name goes back to your configured resolver. Run it from Command Prompt or PowerShell; it does not need a restart.
Why does the old site still load after a flush?
Your resolver may still hold the old answer. Point one test at a different resolver, for example dig @1.1.1.1 example.com, to see whether the new record is live. If it is, wait out the TTL or switch resolvers for the test.
Flush DNS commands by system
| System | Command | Needs admin |
|---|---|---|
| Windows 10 and 11 | ipconfig /flushdns | No |
| macOS | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder | Yes |
| Linux (systemd-resolved) | resolvectl flush-caches | Usually yes |
| Chrome | chrome://net-internals/#dns, Clear host cache | No |
Linux with systemd-resolved
resolvectl flush-cachesCheck the result with resolvectl statistics.
Google Chrome's own cache
chrome://net-internals/#dnsPaste into the address bar, then press Clear host cache.
Questions about Flush DNS cache
Is it safe to flush DNS?
Yes. Flushing only deletes cached lookups, and your device rebuilds them on the next request. The worst effect is a few milliseconds of extra delay on the first visit to each site afterwards.
How do I flush DNS on a phone?
Phones have no flush command. Turning airplane mode on and off, or restarting the phone, clears the cache in most cases. In Chrome on Android you can also open chrome://net-internals/#dns and clear the host cache.
Does flushing DNS fix DNS_PROBE_FINISHED_NXDOMAIN?
Sometimes. That error means the lookup returned no such domain. If the name was recently registered or its records just changed, a flush plus a short wait often fixes it. If the domain truly has no records, a flush changes nothing.
How do I clear DNS on my router?
Restarting the router clears its cache on most home models. The router passes queries to your ISP’s resolver, which keeps its own cache until each record’s TTL runs out.
Put it to work on your own domain
See the first-year and renewal price before you pay.