How to dns flush

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

Quick Answer: DNS flushing clears the local DNS cache on your computer, which stores recent domain name to IP address resolutions. This can help resolve website access issues by forcing your system to fetch fresh DNS records from a server, ensuring you connect to the most up-to-date IP address for a given website.

Key Facts

What is DNS and Why Does it Need Flushing?

The Domain Name System (DNS) acts like the internet's phonebook. When you type a website address (like www.google.com) into your browser, your computer needs to find the corresponding numerical IP address (like 172.217.160.142) to connect to the correct server. This translation process is handled by DNS servers. To speed things up and reduce the load on DNS servers, your computer and network devices store a temporary record of these translations in a local cache. This is known as the DNS cache.

While this caching is generally beneficial, it can sometimes lead to problems. If a website's IP address changes, or if there's a temporary issue with a DNS server, your computer might still be using outdated or incorrect information from its cache. This can result in errors like "Page not found," "This site can't be reached," or a website loading incorrectly. Flushing the DNS cache clears out this stored information, forcing your computer to request a fresh, up-to-date DNS record the next time you try to access the website.

How to Flush Your DNS Cache

The process for flushing your DNS cache varies slightly depending on your operating system. In most cases, it involves opening a command-line interface with administrative privileges and entering a specific command.

Windows

For Windows users, flushing the DNS cache is straightforward:

  1. Open the Command Prompt as an administrator. You can do this by searching for "cmd" in the Start menu, right-clicking on "Command Prompt," and selecting "Run as administrator."
  2. In the Command Prompt window, type the following command and press Enter: ipconfig /flushdns
  3. You should see a message confirming that the DNS Resolver cache was successfully flushed.

This command tells the Windows DNS client resolver service to clear its cache.

macOS

On macOS, the command to flush the DNS cache depends on the version of the operating system:

The `mDNSResponder` process handles multicast DNS and is responsible for DNS caching on macOS.

Linux

Linux distributions use different DNS caching services, so the command can vary:

It's important to identify which DNS caching service your specific Linux distribution is using to execute the correct command.

Routers and Other Devices

Some routers also maintain their own DNS cache. If you're experiencing network-wide DNS issues, you might need to restart your router. Check your router's manual or manufacturer's website for specific instructions on how to do this, as it often involves simply unplugging the router, waiting 30 seconds, and plugging it back in.

When Should You Flush Your DNS?

Flushing your DNS is a useful troubleshooting step in several scenarios:

It's generally not necessary to flush your DNS cache regularly unless you encounter specific problems. Your operating system is designed to manage its cache efficiently.

Potential Side Effects

Flushing your DNS cache is a safe procedure and typically has no negative side effects. The only minor inconvenience is that the first time you visit a website after flushing, it might take slightly longer to load as your computer needs to retrieve the DNS information again. Subsequent visits will be fast as the information is cached again.

Sources

  1. Domain Name System - WikipediaCC-BY-SA-4.0
  2. How to Flush Your DNS Cache - Cloudflarefair-use
  3. Using Google Public DNSfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.