Windows Networking

Flush the DNS cache on Windows

Clear stale DNS records on Windows after changing resolvers or fixing name resolution issues.

6 min read Beginner Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

What you will achieve

Clear the Windows DNS resolver cache so new DNS records take effect and stale entries stop causing resolution failures.

When to flush DNS

  • After changing DNS servers in adapter settings.
  • After migrating a website or mail service to new IPs.
  • When some sites load but others show “server not found” inconsistently.

1) Flush with ipconfig

  1. Open Terminal or Command Prompt as a normal user (admin not required for this command).
  2. Run:
ipconfig /flushdns

Expect: Successfully flushed the DNS Resolver Cache.

2) Restart DNS Client (if issues persist)

  1. Open Services (services.msc) as administrator.
  2. Locate DNS Client.
  3. Restart the service if the option is available on your edition.

On some Windows editions the DNS Client service cannot be restarted manually — reboot instead.

3) Verify resolution

nslookup example.com
ping example.com

Compare results before and after changing DNS servers. Use nslookup example.com 1.1.1.1 to query a specific resolver directly.

dns ipconfig network windows