Flushing the local DNS cache clears incorrect or stale name-to-address results that can break browsing, remote access, and VPN connections after a DNS change. Clearing cached entries forces Windows to request fresh DNS data, which helps restore access and speeds up troubleshooting.

Windows performs hostname resolution through the DNS Client service, which keeps a shared resolver cache on the system. Most applications consult this cache first, and Windows only contacts upstream DNS servers when no valid cached record exists.

A cache flush does not change DNS server settings or override entries in the C:\Windows\System32\drivers\etc\hosts file. The flush command must run in an elevated Command Prompt, and some applications maintain their own internal caches and may require a restart before fresh lookups are used.

Steps to flush DNS cache in Windows:

  1. Open the Start menu.
  2. Search for Command Prompt.
  3. Select Run as administrator for Command Prompt.

    Accept the User Account Control prompt to open an elevated console.

  4. Flush the DNS resolver cache from the elevated prompt.
    C:\> ipconfig /flushdns
    Windows IP Configuration
    Successfully flushed the DNS Resolver Cache.

    The Successfully flushed the DNS Resolver Cache. message confirms the cache was cleared.

  5. Confirm name resolution for the affected hostname.
    C:\> nslookup files.example.net
    Server:  192.0.2.53
    Address: 192.0.2.53
    
    Non-authoritative answer:
    Name:    files.example.net
    Address: 198.51.100.24

    Replace files.example.net with the hostname that was failing.