Command prompt flush DNS on Windows: ipconfig /flushdns in cmd or PowerShell. Clears the local DNS Resolver Cache. The team that runs this after DNS record changes has fresh resolution without waiting for TTL.
Table of contents
- The ipconfig /flushdns command
- PowerShell equivalent
- When DNS Client service is stopped
- Other useful ipconfig commands
- Verify the flush
- Display DNS cache before flush
- For IT admins: flush on multiple machines
- FAQ
The ipconfig /flushdns command
Open Command Prompt (Admin):
ipconfig /flushdns
Output: Successfully flushed the DNS Resolver Cache.
The team that runs this on Windows has fresh DNS.
PowerShell equivalent
Open PowerShell:
Clear-DnsClientCache
Same effect, different syntax. The team that uses PowerShell has the modern way.
When DNS Client service is stopped
If the DNS Client service is stopped, ipconfig /flushdns fails with The requested service has not been started. Fix:
net start "DNS Client"
Or via Services GUI: services.msc -> DNS Client -> Start. The team that has the service stopped has the fix.
Other useful ipconfig commands
ipconfig /all # full network config
ipconfig /displaydns # show DNS cache
ipconfig /release # release DHCP lease
ipconfig /renew # renew DHCP lease
ipconfig /registerdns # manually register DNS
The team that uses these has full network debugging.
Verify the flush
After flushing:
nslookup example.com
Should show the new IP. The team that verifies has confirmation.
Display DNS cache before flush
ipconfig /displaydns
Shows cached entries with their TTLs. The team that uses this sees what’s about to be flushed.
For IT admins: flush on multiple machines
Use PsExec or PowerShell remoting:
Invoke-Command -ComputerName server1,server2,server3 -ScriptBlock {
Clear-DnsClientCache
}
The team that flushes on multiple machines has consistent state.
FAQ
Does ipconfig /flushdns require admin?
Yes - it modifies the system DNS cache. Run as Administrator.
How long does the DNS cache take to refill?
As you make DNS queries. The team that flushes and re-browses repopulates the cache.
Is there a registry setting for DNS cache size?
Yes - HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\MaxCacheEntryTtlLimit. Default 1 day.
Can I flush DNS on a remote machine?
Yes via PowerShell remoting or PsExec. The team that has admin access can flush remotely.
Does ipconfig /flushdns affect other users?
Yes - the DNS Client service is system-wide. The team that flushes on a server affects all users on that server.
If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.
Useful related references: