What does ipconfig /flushdns do
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 4, 2026
Key Facts
- Flushing the DNS cache removes stored domain name to IP address mappings.
- This command is primarily used to troubleshoot network connectivity issues.
- It forces your computer to obtain fresh DNS information from servers.
- The command is available on Windows operating systems.
- It can resolve problems like being unable to access websites that have recently changed IP addresses.
What is DNS?
Before diving into what `ipconfig /flushdns` does, it's helpful to understand the Domain Name System (DNS). Think of DNS as the internet's phonebook. When you type a website address (like www.google.com) into your browser, your computer needs to translate that human-readable name into a machine-readable IP address (like 172.217.160.142) that servers use to identify each other. This translation process is handled by DNS servers.
What is the DNS Resolver Cache?
To speed up this process and reduce the number of times your computer has to query external DNS servers, your operating system maintains a local cache, often called the DNS resolver cache or DNS cache. This cache stores the results of recent DNS lookups. So, the next time you visit the same website, your computer can retrieve the IP address directly from its local cache instead of going through the entire DNS query process again.
What Does `ipconfig /flushdns` Do?
The `ipconfig /flushdns` command is a utility found in Windows operating systems that specifically targets this local DNS cache. When you run this command in the Command Prompt (as an administrator), it instructs your computer to clear out all the entries currently stored in its DNS resolver cache. Effectively, it empties the 'internet phonebook' on your machine.
Why Would You Use `ipconfig /flushdns`?
There are several common scenarios where flushing the DNS cache can be beneficial:
- Website Accessibility Issues: If you're suddenly unable to access a website that you could previously reach, or if you're getting an error message like 'Page cannot be found,' it's possible that the website's IP address has recently changed, and your local cache is still holding onto the old, incorrect information. Flushing the cache forces your computer to fetch the new IP address.
- Network Configuration Changes: If network administrators have made changes to DNS records (e.g., moved a website to a new server), your computer might still be using outdated information from its cache.
- Malware or Network Problems: Sometimes, malware can interfere with DNS settings, or general network glitches can cause the DNS cache to become corrupted. Flushing it can help reset these settings.
- Testing DNS Changes: Developers or network administrators might use this command to ensure they are seeing the effects of recent DNS changes immediately, rather than waiting for the cache on their local machine to expire naturally.
How to Use `ipconfig /flushdns`
Using the command is straightforward:
- Open the Command Prompt as an administrator. You can do this by searching for 'cmd' in the Windows search bar, right-clicking on 'Command Prompt,' and selecting 'Run as administrator.'
- In the Command Prompt window, type the following command and press Enter:
ipconfig /flushdns - You should see a confirmation message stating: "Successfully flushed the DNS Resolver Cache."
Potential Side Effects and Alternatives
Flushing the DNS cache is generally a safe operation. The primary 'side effect' is that your computer will need to re-resolve domain names the next time you access them, which might lead to a very slight, temporary increase in the time it takes to load websites. However, this is usually negligible. It does not affect your ability to browse the internet.
While `ipconfig /flushdns` is specific to Windows, other operating systems have similar functionalities:
- macOS: The command varies depending on the macOS version, but often involves commands like `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder`.
- Linux: Linux distributions often use services like `systemd-resolved` or `dnsmasq`, and flushing commands will depend on which service is active (e.g., `sudo systemd-resolve --flush-caches` for systemd-resolved).
In summary, `ipconfig /flushdns` is a useful command-line tool for Windows users to resolve common network and website access issues by clearing outdated DNS information stored locally on their computer.
More What Does in Daily Life
Also in Daily Life
More "What Does" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Ipconfig | Microsoft Learnfair-use
- Domain Name System - WikipediaCC-BY-SA-4.0
- What is DNS cache flushing? | Cloudflarefair-use
Missing an answer?
Suggest a question and we'll generate an answer for it.