For our Blog Visitor only Get Additional 3 Month Free + 10% OFF on TriAnnual Plan YSBLOG10
Grab the Deal

Ipconfig /flushdns Command Explained With Example in 2026

The ipconfig /flushdns command clears the local DNS resolver cache in Windows, forcing your computer to fetch fresh DNS records for websites. Use it when sites don’t load, resolve to old IPs after DNS changes, or you see DNS related errors.

It’s safe, quick, and helpful for troubleshooting browsing and connectivity issues. If you’ve ever updated DNS records, migrated a site, or run into “site not found” errors, the primary fix on Windows is often the ipconfig /flushdns command.

In this guide, I’ll explain what it does, when to use it, and show a clear, real world example with verification steps, plus troubleshooting tips from 12+ years optimizing networks.


What is the DNS Cache and Why Flush it?

DNS (Domain Name System) translates domain names like example.com into IP addresses.

ipconfig /flushdns command

To speed up browsing, Windows stores recent DNS lookups in a local cache. This cache can become outdated after DNS changes (like moving to a new server), causing your PC to keep using the old IP. Flushing removes those stale entries so your system queries DNS again and gets the correct, current IPs.

What Does ipconfig /flushdns Actually Do?

ipconfig /flushdns tells the Windows DNS Client service (Dnscache) to purge all cached resolver entries. After the flush, the first request for any domain forces a fresh DNS query to your configured DNS servers (ISP, public DNS, or DoH provider). It does not change your DNS servers or network settings; it simply clears the memory of recent lookups.

  • Scope: Affects the local machine’s DNS resolver cache for all users.
  • Speed: Immediate; takes a fraction of a second.
  • Safety: Safe to run anytime. Worst case, your next lookups are slightly slower as the cache rebuilds.

When Should You Run ipconfig /flushdns?

  • After DNS changes (A, CNAME, or MX updates) for your domain or client sites.
  • Post migration to a new web host or server IP.
  • When some users can access a site but you cannot.
  • To resolve errors like DNS_PROBE_FINISHED_NXDOMAIN or intermittent “server IP address could not be found.”
  • When a content delivery network (CDN) or proxy (Cloudflare) record changed and your PC still points to the old edge.

Prerequisites and Quick Notes

  • Run Command Prompt or PowerShell as Administrator for consistent results.
  • Ensure the DNS Client (Dnscache) service is running; the command needs it.
  • Flushing only affects your PC; it doesn’t update external DNS or fix upstream misconfigurations.

How to Run ipconfig /flushdns on Windows (Step-by-Step)

Method 1: Command Prompt

1) Click Start, type “cmd”. 2) Right click Command Prompt > Run as administrator. 3) Enter the flush command:

ipconfig /flushdns

You should see:

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

Method 2: Windows PowerShell

Open PowerShell as Administrator and run:

ipconfig /flushdns

PowerShell also supports a native cmdlet on modern Windows builds:

Clear-DnsClientCache

Verify the Flush Worked

  • View the cache (before or after):
ipconfig /displaydns
  • Resolve a domain again (forces fresh queries):
nslookup example.com
ping example.com

If you see the new IP from your DNS provider or host, the flush succeeded.


ipconfig /flushdns Explained With a Real Example

You migrated example.com from an old server (203.0.113.10) to a new server (198.51.100.25) with updated A records at your DNS provider. Your colleague sees the new site, but your PC loads the old one.

1) Check current resolution:

nslookup example.com
Non-authoritative answer:
Name:    example.com
Address: 203.0.113.10  <-- old IP

2) Flush DNS cache:

ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

3) Resolve again:

nslookup example.com
Non-authoritative answer:
Name:    example.com
Address: 198.51.100.25  <-- new IP

Now your browser points to the correct server. If you’re a YouStable customer, this is the fastest way to ensure your PC picks up our DNS or hosting changes immediately after propagation begins.


Troubleshooting: If ipconfig /flushdns Doesn’t Work

“Access is denied” or No Success Message

  • Run Command Prompt or PowerShell as Administrator.
  • Make sure your antivirus or endpoint security isn’t blocking system utilities.

DNS Client (Dnscache) Service Is Stopped

ipconfig relies on the DNS Client service. Start it:

sc query dnscache
sc start dnscache

Browser and App Level DNS Caches

  • Chrome/Edge: Visit chrome://net internals/#dns and click “Clear host cache.”
  • Firefox: Visit about:networking#dns and press “Clear DNS Cache.”
  • Applications (VPNs, proxies, Docker): They may cache DNS internally; restart the app or its service.

Encrypted DNS (DoH/DoT) or VPN Overrides

DNS over HTTPS, custom resolvers, or corporate VPNs can bypass system level resolution. Temporarily disable them or check their own caches/settings. Ensure your Windows adapter uses the intended DNS servers.

Hosts File Still Forcing an IP

If you’ve edited the hosts file, it overrides DNS queries. Remove stale entries from C:\Windows\System32\drivers\etc\hosts and try again.


  • ipconfig /displaydns: View cache entries and TTLs.
  • ipconfig /registerdns: Re-register your computer’s DNS records (useful in domain environments).
  • nslookup or Resolve DnsName: Manually test resolution and target specific DNS servers.
  • Clear DnsServerCache (Windows Server with DNS role): Flushes the server’s cache, not the client.

How to Flush DNS on macOS and Linux (For Comparison)

While ipconfig /flushdns is Windows only, similar actions exist on other OSes:

  • macOS (Ventura/Sonoma): sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Ubuntu/Debian (systemd resolved): sudo resolvectl flush caches
  • Systemd based Linux: sudo systemd resolve –flush caches
  • nscd (if installed): sudo service nscd restart

Best Practices from Real World Hosting Experience

  • Plan DNS changes with low TTLs: Lower TTL to 300 seconds 24 hours before migration to speed up global updates.
  • Flush locally after changes: Run ipconfig /flushdns and clear browser cache to eliminate local staleness.
  • Check multiple resolvers: Test with nslookup against 1.1.1.1 or 8.8.8.8 to confirm DNS is live beyond your ISP.
  • Avoid over-reliance on cache: Caching helps performance, but during transitions, it’s the primary source of confusion.
  • Use reliable DNS hosting: Providers like YouStable offer globally distributed DNS with fast propagation and uptime.

Security and Privacy Considerations

  • Local privacy: Flushing removes a record of domains your PC recently resolved.
  • Malware and hijacking: If you suspect DNS hijacking or adware, flushing is a first step follow up by checking hosts file, DNS servers, and running a malware scan.
  • Enterprise logging: Remember that upstream DNS resolvers may still log queries; flushing is local only.

Automation Tips

For admins and power users who need to flush frequently during migrations or testing, script it:

@echo off
echo Flushing DNS...
ipconfig /flushdns
echo Displaying DNS cache...
ipconfig /displaydns | more

Or use PowerShell:

Clear-DnsClientCache
Resolve-DnsName yourdomain.com

Key Takeaways

  • ipconfig /flushdns clears the Windows DNS resolver cache and is safe to run anytime.
  • Use it after DNS or hosting changes, migrations, or when you see DNS related errors.
  • Verify with ipconfig /displaydns, nslookup, or Resolve DnsName.
  • Also clear browser/app caches and check hosts/VPN/DoH if issues persist.
  • For fast, reliable DNS and hosting transitions, YouStable’s infrastructure helps minimize downtime and confusion.

FAQ’s

1. Is it safe to run ipconfig /flushdns regularly?

Yes. It’s safe and doesn’t change your network settings. Flushing may briefly slow the next lookup while the cache rebuilds, but there’s no harm in running it as needed during troubleshooting or after DNS changes.

2. Does ipconfig /flushdns clear Chrome or Firefox DNS caches?

No. It clears the Windows resolver cache only. Chrome, Edge, and Firefox maintain their own caches. Manually clear them (chrome://net internals/#dns, about:networking#dns) or restart the browser to avoid stale results.

3. What’s the difference between ipconfig /flushdns and ipconfig /renew?

/flushdns clears DNS records your PC stored locally. /renew requests a new IP lease from DHCP for your network adapter. Use /renew for IP conflicts or connectivity issues, and /flushdns for name resolution problems.

4. How do I know if DNS has propagated after a change?

Test with nslookup or Resolve DnsName against multiple resolvers (ISP, 8.8.8.8, 1.1.1.1). If all return the new IP, propagation is largely complete. Locally, flush your cache and clear browser caches to ensure you’re not seeing old data.

5. Does ipconfig /flushdns work on Windows 11 and Windows Server?

Yes. It works on Windows 11/10 and supported Windows Server editions. On servers running the DNS role, remember the client flush is separate from the server cache; use Clear DnsServerCache to clear the DNS server’s cache.

Sanjeet Chauhan

Sanjeet Chauhan is a blogger & SEO expert, dedicated to helping websites grow organically. He shares practical strategies, actionable tips, and insights to boost traffic, improve rankings, & maximize online presence.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top