Guide

How to restart DNS Client service on Windows

Relaunch DNS Client service when required by a specific troubleshooting.

⌚ About 2 min read
View my favorites
Windows Intermediate. 3 min

Relaunch DNS Client service when required by a specific troubleshooting.

Avant de commencer : adaptez toujours les commandes et manipulations à votre environnement. Sur un système de production, prévoyez une backup ou un retour arrière lorsque l’action peut modifier la configuration.

Étapes à suivre

  1. 1

    Open Power Shell as admin

    Elevation is usually required.

  2. 2

    Control the service

    Use the Dnscache service.

  3. 3

    Restart if appropriate

    Use Re Start-Service Dnscache.

  4. 4

    Retester resolution

    Use Resolve-DnsName or nslookup.

Commands utiles

Well-Service Dnscache
Re-Sales Service
Resolve-Dns(1) example.fr

À retenir

  • Usually start by emptying the DNS cache before restarting a service.
  • On some versions/configurations, the service can be protected or managed differently.
Technical deep dive

Windows DNS cache: what is actually cleared

Technical checkpoints

  • ipconfig /flushdns clears the local DNS Client cache; it does not clear a DNS server cache or an application/browser cache.
  • Get-DnsClientCache shows cached entries and their TTL.
  • Restarting Dnscache is more intrusive than a flush and is normally unnecessary just to invalidate an entry.

Before / after

Inspect the entry, clear the cache, then resolve the same name again using the same DNS server.

Get-DnsClientCache
ipconfig /flushdns
Resolve-DnsName example.com

Topic-specific pitfalls

  • Testing a different name after the flush does not prove the problematic entry changed.
  • A hosts file, NRPT, browser DoH or VPN can bypass the expected resolver.

How to validate

  • The name resolves to the expected address and the response source is identified.
  • TTL and cache behavior are consistent with the expected DNS change.
♡ 0