How to Flush DNS in Windows 7, Windows 8, XP and Windows Vista

When you access a website, the computer will perform DNS caching, which means that the data in the form of domain name and IP address of the website that you access are locally stored in the computer for a period of time, so when you open a web page that has previously been opened it will feel faster because the computer has remembered the IP address and it does not need to contact the DNS server. However, which often be a problem is that the DNS cache can sometimes be corrupted and it causes problems like some websites that can not be accessed when the internet connection has no problem. At this point the DNS flush is needed.

DNS flush will force the computer to clear the DNS cache or in other words it forces the computer to erase all memory of the domain name and the IP address associated with the domain name. Once the DNS cache is empty, the computer will start asking for new data from the DNS server and it will build DNS cache from the beginning.

flush dns cache

How to Flush DNS cache in Windows XP

  1. Click Start > All Programs > Accessories > click on Command Prompt

  2. Type ipconfig /flushdns

  3. Hit Enter

How to Flush DNS in Windows 7

The steps below can also be applied to Windows Vista.

  1. Click Start > All Programs > Accessories > right click on Command Prompt > select Run as Administrator

  2. Type ipconfig /flushdns

  3. Hit Enter

Windows 7 users: Make sure that you run the cmd with administrator level or it will appear error “The requested operation requires elevation.”. An alternative method for accessing the command prompt with an administrator level is available on this page.

How to Flush DNS in Windows 8

Flush DNS command on Windows 8 is the same to DNS flush command on Windows 7, the difference is only in how to open the command prompt.

  1. Press Win key (Windows logo key) + X > click Command Prompt (Admin)

  2. Type ipconfig /flushdns

  3. Hit Enter

Articles that I recommend to read:
Finding the fastest DNS server with DNSBench
List of fastest Public DNS Servers

  • Matt

    Thanks a lot!

  • Josh

    When I run cmd under XP, and type ipconfig /flushdns
    i get this error: Could not flush the DNS Resolver Cache: Function Failed During Execution.

    • picohelp

      run cmd as administrator….