Saltar al contenido
Windows

View and Clear the DNS Cache on Windows (ipconfig /displaydns)

Run ipconfig /displaydns to list cached DNS answers and ipconfig /flushdns to clear them. Useful after DNS changes or when a site resolves to the wrong address.

Probado en Windows 11 24H2

Windows keeps a local cache of every domain name it resolves, so repeat visits are faster. That cache is also a useful window into what your computer has been connecting to – and the first thing to clear when a website suddenly resolves to the wrong place.

View the DNS cache

Open Command Prompt (no administrator rights needed to view) and run:

Command Prompt
ipconfig /displaydns

Each entry shows the record name, record type (1 = A, 28 = AAAA, 5 = CNAME), time to live in seconds and the answer. To search the long output, pipe it to findstr:

Command Prompt
ipconfig /displaydns | findstr /i u0022microsoftu0022

In PowerShell the same data is easier to filter:

PowerShell
Get-DnsClientCache | Sort-Object Entry | Format-Table Entry, Type, TimeToLive, Data -AutoSize

Clear the DNS cache

Run this from an administrator prompt:

Command Prompt (Administrator)
ipconfig /flushdns

Windows confirms with Successfully flushed the DNS Resolver Cache. The next lookup for each site goes to your DNS server again.

When this helps

  • A website moved to a new server and you still reach the old one
  • You edited the hosts file or changed DNS servers
  • Investigating unexpected connections from a PC
  • Clearing your local lookup history for privacy

Check what the world sees

If clearing the cache doesn’t help, the problem may be the DNS record itself. Look it up publicly with the DNS Lookup tool.

Inder Kochar

Escrito por

Inder Kochar

Ingeniero de sistemas y redes – Documento las soluciones que aplico con mis clientes, probadas en sistemas reales. ¿Atascado con algo parecido?

Seguir leyendo

Haga una pregunta o comparta su solución

Su correo no se publica. Los comentarios se moderan – por favor, cíñase al tema.