Flush DNS: What It Is & How to Easily Clear DNS Cache (2024)

Flushing or clearing your DNS cache protects your privacy, helps you resolve HTTP errors, and prevents malicious DNS spoofing.

Flush DNS: What It Is & How to Easily Clear DNS Cache (1)

In this post, we’ll cover everything you need to know about flush DNS, including:

  • what flush DNS does
  • why you would flush DNS
  • how to flush DNS
    • on Windows 10
    • on Windows 7
    • on Windows XP and Vista
    • on Mac OS X
    • on Chrome
    • on Linux

What is DNS cache?

A DNS (Domain Name System) cache is a record of all queries made to a DNS server from your browser. When you input an URL into your browser, your browser sends a request to the DNS server asking for the URL’s IP address. After your browser receives the IP address, it can then load the correct website in your window.

But what happens when you try to access the website a second time? Does the browser have to make a whole new request to the DNS server?

No. By default, most operating systems will cache IP addresses and other Domain Name System (DNS) records in order to fulfill future requests more quickly. This is your DNS cache. The DNS cache prevents browsers from having to make a new request so that, instead, it can use stored information to load the website. This reduces server response times, making the site load more quickly.

Flush DNS: What It Is & How to Easily Clear DNS Cache (3)

Free Website Optimization Checklist

This website optimization checklist will help you perfect your website's:

  • Performance
  • SEO
  • Security
  • Mobile Performance
Learn more

    Download Free

    All fields are required.

    Flush DNS: What It Is & How to Easily Clear DNS Cache (4)

    You're all set!

    Click this link to access this resource at any time.

    Download Now

    What does flush DNS do?

    Flushing DNS will clear any IP addresses or other DNS records from your cache. This can help resolve security, internet connectivity, and other issues.

    For example, when I type in https://lonezscents.com/ in my browser’s address bar for the first time, the browser has to ask DNS servers where to find the site. Once it has that information, the browser can store it in its local cache. Then, the next time I type in that website address, the browser will look for its DNS information in the local cache first and be able to find the site more quickly.

    The problem is that sometimes dangerous IP addresses or corrupted results can be cached and need to be removed. The DNS cache can also impact your ability to connect to the internet or cause other issues. Whatever the reason, all major operating systems allow you to force the process of clearing this cache — or “flushing DNS.”

    It’s important to understand that your DNS cache will clear itself out from time to time without your intervention. That’s because the DNS cache — in addition to saving all information that’s relevant to identifying and finding a website — also saves a component called TTL, or time to live.

    Flush DNS: What It Is & How to Easily Clear DNS Cache (5)

    Image Source

    TTL specifies a period of time (in seconds) in which the DNS record for a site remains valid. Within this time period, any queries to the website are answered from the local cache without the help of the DNS server. Once the TTL expires, the entry will be removed from the cache.

    However, there are reasons you may need to force a DNS flush rather than wait for the TTL of all the entries to expire. Let’s take a look at why below.

    Why would you flush DNS?

    There’s a few reasons you might need to flush your DNS cache. These reasons may have to do with security, technical problems, or data privacy. Let’s briefly cover each one below.

    1. You want to prevent DNS spoofing.

    DNS spoofing — also known as DNS cache poisoning — is an attack in which bad actors gain access to your DNS cache and alter the information in order to redirect you to the wrong sites. In some cases, they will redirect you to a fraudulent website that resembles its intended destination so that you enter in sensitive information, like your online banking login information.

    Flush DNS: What It Is & How to Easily Clear DNS Cache (6)

    Image Source

    2. You’re seeing a 404 error.

    Let’s say you’ve cached the DNS information of a site that’s since moved to a new domain name or host. In that case, the DNS information on your computer may not get updated right away and you could end up seeing a 404 error or an outdated version of a site when you try to visit. Although the information will eventually get updated in your DNS cache, you don’t have to wait. You can clear the DNS cache at any time.

    3. You’re having trouble accessing a website.

    If you’re having trouble getting a website to load, then you should try other steps first, like clearing your browser's temporary files and cookies and adjusting your browser settings to turn off pop-up blockers and allow sites to save and read cookies. But if you’ve exhausted your options, then you can flush your DNS records and make a new request to the server.

    4. You want to keep your search behavior private.

    When you think of tracking user behavior on the internet, you probably think of cookies — but the DNS cache can reveal your search history as well. That’s because the DNS cache is designed to act like a virtual address book, storing the information of the websites you visit regularly. To keep this information away from data collectors or bad actors on the web, it’s a good idea to regularly flush your DNS cache.

    Now that we understand what flushing your DNS cache means and why you’d want to, let’s walk through how you can do it below.

    How to Flush DNS

    1. On Mac: Open Finder.
    2. Click Applications.
    3. Scroll down to the Utilities folder and click it.
    4. Open Terminal.
    5. In the Terminal window, enter the following command string: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
    6. Click enter, then input your admin password.
    7. Click enter again.

    The process for flushing DNS varies depending on your computer’s operating system. Let’s go over the process for the major systems below.

    Flush DNS: What It Is & How to Easily Clear DNS Cache (7)

    Free Website Optimization Checklist

    This website optimization checklist will help you perfect your website's:

    • Performance
    • SEO
    • Security
    • Mobile Performance
    Learn more

      Download Free

      All fields are required.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (8)

      You're all set!

      Click this link to access this resource at any time.

      Download Now

      How to Flush DNS Mac OS X

      The process for flushing your DNS cache on a Mac computer is similar, no matter what software version it’s running. But you will need to know what version for step 6 since the command prompt varies.

      1. Open Finder.

      2. Click Applications.

      3. Scroll down to the Utilities folder and click it.

      4. Open Terminal.

      5. To open Terminal, you could also simply open Launchpad and type in “Terminal” in the search bar.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (9)

      6. In the Terminal window, type in the one of the following commands based on your software version:

      • Ventura & Monterey: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
      • Lion, Mountain Lion, Mavericks, El Capitan, Sierra, High Sierra, Mojave: sudo killall -HUP mDNSResponder
      • Yosemite: sudo discoveryutil mdnsflushcache
      • Tiger: lookupd -flushcache

      Flush DNS: What It Is & How to Easily Clear DNS Cache (10)

      7. Enter your password and press Enter again.

      8. You should see a message confirming that the DNS cache has been reset.

      How to Flush DNS Windows

      1. Click the Start button on the bottom left corner.
      2. Select Command Prompt from the list of apps.
      3. If there's a popup asking you to allow Command Prompt to make changes to your computer, select Yes.
      4. If you are asked for an administrative login, then you’ll need to contact your system administrator to proceed.
      5. In the command prompt window, type ipconfig /flushdns.
      6. Press Enter.

      How to Flush DNS Windows 10 & 11

      Here’s the processing for flushing your DNS cache on Windows 10 and 11. These steps should also work for Windows 8.1.

      1. Click the Start button. It’s the Windows logo in the bottom left corner.

      2. Select Command Prompt.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (11)

      Image Source

      3. To open the command prompt console, you could also simply press the Windows and R keys at the same time and enter cmd.

      4. You may see a popup asking if you want to allow Command Prompt to make changes to your computer. If you do, select Yes.

      5. If you are asked for an administrative login at this point, then you’ll need to contact your system administrator to proceed.

      6. In the command prompt window, type ipconfig /flushdns.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (12)

      Image Source

      7. Press Enter.

      8. You should see a message confirming that the DNS Resolver Cache was successfully flushed.

      How to Flush DNS Windows 7

      The process for flushing your DNS cache on Window 7 is nearly identical to that of later versions.

      1. Click the Start button. It’s the Windows logo in the bottom left corner.

      2. Click All Programs > Accessories.

      3. Find Command Prompt. Right-click it, and choose Run as administrator.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (13)

      Image Source

      4. You may see a popup asking if you want to allow Command Prompt to make changes to your computer. If you do, select Yes.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (14)

      Image Source

      5. If you are asked for an administrative login at this point, then you’ll need to contact your system administrator to proceed.

      6. In the command prompt window, type ipconfig /flushdns.

      7. Press Enter.

      8. You should see a message confirming that the DNS Resolver Cache was successfully flushed.

      How to Flush DNS Windows XP and Vista

      The process for flushing your DNS cache on Windows XP and Vista is nearly identical to that of Windows 7. However, the message at the end varies and may require admin intervention.

      1. Click the Start button. It’s the Windows logo in the bottom left corner.

      2. Click All Programs > Accessories.

      3. Select Command Prompt.

      4. In the command prompt window, type ipconfig /flushdns.

      5. Press Enter.

      6. You should see a message confirming that the DNS Resolver Cache was successfully flushed. If you receive a message that says “Action Requires Elevation” instead, then you need to contact the admin of your computer to complete the steps above.

      Flush DNS: What It Is & How to Easily Clear DNS Cache (15)

      Free Kit: How to Run an SEO Audit

      Use this kit to start running a better website.

      • SEO Template
      • Audit Checklist
      • Introductory Guide
      • And more!
      Learn more

        Download Free

        All fields are required.

        Flush DNS: What It Is & How to Easily Clear DNS Cache (16)

        You're all set!

        Click this link to access this resource at any time.

        Download Now

        How to Flush DNS Linux

        Unlike Windows and Mac computers, Linux systems don’t have a DNS cache by default. However, each distribution might use a different DNS service to store DNS records locally. Depending on the service, you can either clear the cache or restart the service.

        1. Press Ctrl+Alt+T on your keyboard to launch a terminal window.

        Flush DNS: What It Is & How to Easily Clear DNS Cache (17)

        Image Source

        2. In the Terminal window, type in the one of the following commands based on the service your Linux system is running.

        • NCSD: sudo /etc/init.d/nscd restart
        • Dnsmasq: sudo /etc/init.d/dnsmasq restart
        • BIND: You may have to try multiple commands:
          • sudo /etc/init.d/named restart
          • sudo rndc restart
          • sudo rndc exec

        3. You may be asked to enter your password.

        4. The service might stop, then start again before sending a confirmation message that the cache was successfully reset.

        How to Clear DNS Cache on Chrome

        1. Launch Google Chrome on your desktop device.
        2. Type in the following address into your browser’s address bar: chrome://net-internals/#dns
        3. Click the Clear host cache button.
        4. All done!

        Google Chrome is not an operating system, but it does keep a DNS cache of its own. This is separate from your operating system’s cache and from Chrome’s browser cache. If Chrome is set as your default web browser, then you’ll need to clear Chrome’s DNS cache as well as your operating system’s DNS cache.

        Here’s the process:

        1. Type in the following address into your browser’s address bar: chrome://net-internals/#dns

        2. Click the Clear host cache button.

        Flush DNS: What It Is & How to Easily Clear DNS Cache (18)

        3. All done!

        Flushing Your DNS Cache

        There are a lot of reasons to regularly flush your DNS cache. It can help prevent phishing schemes or other attacks on your computer, direct you to the most up-to-date versions of your most frequently visited sites, restore your internet connection, and keep your data private.

        The best part is how easy the process is. Following the steps above can help you perform a DNS flush quickly and easily, no matter what operating system your computer has. That way, you can move onto your other website development tasks.

        Topics: Website Development

        Flush DNS: What It Is & How to Easily Clear DNS Cache (2024)

        FAQs

        How do I clear DNS cache and flush DNS cache? ›

        However, the message at the end varies and may require admin intervention.
        1. Click the Start button. ...
        2. Click All Programs > Accessories.
        3. Select Command Prompt.
        4. In the command prompt window, type ipconfig /flushdns.
        5. Press Enter.
        6. You should see a message confirming that the DNS Resolver Cache was successfully flushed.
        Apr 3, 2024

        What is the difference between DNS flush and clear cache? ›

        ipconfig /flushdns will flush the local computer cache. And dnscmd /clearcache will clear the dns server cache. With the former you will clear the "local" cache of the server you work on. It will NOT clear the dns server cache.

        What does flushing DNS do? ›

        Flushing DNS is a process of clearing the cache and resolver caches, making sure that all the DNS records are up-to-date. The main purpose of this process is to improve the performance of the network and make it more stable. It also helps in resolving the hostnames to IP addresses.

        Is it safe to flush DNS? ›

        Flushing DNS is a straightforward yet potent method for resolving many internet connectivity issues. It's a safe procedure and can often be the initial step in troubleshooting network problems. Regular flushing of your DNS cache can also be a prudent practice for maintaining privacy and security online.

        How do I clear my DNS history? ›

        Click the Windows Start menu and type cmd to open Command Prompt. Select Run as administrator. Type the command ipconfig/flushdns and hit Enter to delete the DNS cache, which contains all the saved incognito history on your device.

        How often should you flush DNS cache? ›

        The process of flushing your DNS cache takes approximately 15 minutes and has no negative impact, so you may clear yours as frequently as you like.

        How do I reset my DNS? ›

        How to reset the DNS in Windows
        1. Using the Start Menu at the lower left corner of your screen: ...
        2. Enter CMD into the text box and then select the Command Prompt program.
        3. A new black window will appear. ...
        4. Type ipconfig /flushdns and press ENTER (please note: there is a space between ipconfig and /flushdns)
        5. Restart your computer.

        How do I resolve a DNS problem? ›

        1. Try Using A Different Browser. Strictly speaking, switching to another browser won't fix DNS issues. ...
        2. Check The Site From A Different Device. ...
        3. Restart Your Computer. ...
        4. Restart Your Computer In Safe Mode. ...
        5. Turn Off Antivirus Software And/Or Your Firewall. ...
        6. Turn Off Your VPN. ...
        7. Flush DNS Cache. ...
        8. Restart Your Router.
        Dec 15, 2023

        How do I reset my IP and flush DNS? ›

        To release/renew your IP address, and flush DNS on Windows:
        1. Search box "Commend prompt"
        2. Type "ipconfig /release" and press Enter.
        3. Type "ipconfig /renew" and press Enter.
        4. Type "ipconfig /flushdns" and press Enter.
        5. Restart the computer.
        Feb 7, 2022

        Does flushing DNS delete history? ›

        It will not clear anything other than your DNS cache, hence everything else will be where it was (passwords, auto-fill, etc). The purpose of DNS is to resolve hostnames (such as google.com) and convert it to its IP address (172.217. 12.46 in my case). Your cache will simply repopulate itself once you revisit a website.

        How do I clean up DNS? ›

        To Flush the DNS Cache:
        1. 1.At the bottom left corner, type 'cmd' in the Start menu's search bar, and press Enter.
        2. Type 'ipconfig /flushdns' in the Command Prompt, and press Enter.
        3. The user has now flushed the DNS Cache and will receive a message that they have successfully done so.
        Aug 3, 2023

        How long is DNS cache stored? ›

        The default setting is one day (86,400 seconds).

        How to reset DNS settings? ›

        Windows
        1. On the taskbar search, type "Command Prompt."
        2. Right click on Command Prompt and press "run as administrator."
        3. When asked whether to allow Command Prompt to make changes to your computer, select Yes.
        4. Open Command Prompt.
        5. Type the command ipconfig /flushdns then press enter.

        Does flushing DNS speed up internet? ›

        Once you've successfully flushed the DNS cache, you may initially notice that it's taking a little longer to navigate to the website you regularly browse on your PC. Don't lose patience! You'll experience improved network and Internet speeds soon enough as your DNS cache is populated again with valid information.

        How do I clear DNS cache internals? ›

        Flushing the DNS cache in Chrome

        In the URL bar, type in chrome://net-internals/#dns: In the left pane, select DNS. In the right pane, tap the Clear host cache button.

        How do I fix the DNS_probe_finished_nxdomain error? ›

        Final thoughts on the DNS_PROBE_FINISHED_NXDOMAIN fix
        1. Reboot the internet connection and restart your computer.
        2. Flush DNS cache.
        3. Renew the IP address on the computer.
        4. Restart DNS client service (Windows only)
        5. Change the DNS server.
        6. Disable antivirus & VPN.
        7. Check local hosts file settings.
        8. Reset Chrome flags.
        Dec 5, 2023

        Top Articles
        Transcription factors
        Why Sleep is the Most Important Thing You Can Do for Your Health
        The Tribes and Castes of the Central Provinces of India, Volume 3
        Overton Funeral Home Waterloo Iowa
        Live Basketball Scores Flashscore
        Apex Rank Leaderboard
        Nwi Police Blotter
        18443168434
        Charmeck Arrest Inquiry
        Mens Standard 7 Inch Printed Chappy Swim Trunks, Sardines Peachy
        Dumb Money
        The Murdoch succession drama kicks off this week. Here's everything you need to know
        Uc Santa Cruz Events
        Google Feud Unblocked 6969
        Inside the life of 17-year-old Charli D'Amelio, the most popular TikTok star in the world who now has her own TV show and clothing line
        CANNABIS ONLINE DISPENSARY Promo Code — $100 Off 2024
        Where to Find Scavs in Customs in Escape from Tarkov
        Kayky Fifa 22 Potential
        Ruse For Crashing Family Reunions Crossword
        Is Windbound Multiplayer
        Gazette Obituary Colorado Springs
        Haunted Mansion Showtimes Near Epic Theatres Of West Volusia
        European Wax Center Toms River Reviews
        Craiglist.nj
        Chicago Based Pizza Chain Familiarly
        Masterbuilt Gravity Fan Not Working
        Jackass Golf Cart Gif
        Healthy Kaiserpermanente Org Sign On
        Myaci Benefits Albertsons
        Ehome America Coupon Code
        Metro By T Mobile Sign In
        Human Unitec International Inc (HMNU) Stock Price History Chart & Technical Analysis Graph - TipRanks.com
        Gerber Federal Credit
        Amici Pizza Los Alamitos
        Edict Of Force Poe
        Elisabeth Shue breaks silence about her top-secret 'Cobra Kai' appearance
        Adam Bartley Net Worth
        MSD Animal Health Hub: Nobivac® Rabies Q & A
        Postgraduate | Student Recruitment
        Janaki Kalaganaledu Serial Today Episode Written Update
        Amc.santa Anita
        Gamestop Store Manager Pay
        Honkai Star Rail Aha Stuffed Toy
        Gary Vandenheuvel Net Worth
        Spreading Unverified Info Crossword Clue
        Unblocked Games 6X Snow Rider
        Congruent Triangles Coloring Activity Dinosaur Answer Key
        Mytmoclaim Tracking
        Hy-Vee, Inc. hiring Market Grille Express Assistant Department Manager in New Hope, MN | LinkedIn
        The Significance Of The Haitian Revolution Was That It Weegy
        Renfield Showtimes Near Regal The Loop & Rpx
        Latest Posts
        Article information

        Author: Gregorio Kreiger

        Last Updated:

        Views: 6299

        Rating: 4.7 / 5 (57 voted)

        Reviews: 88% of readers found this page helpful

        Author information

        Name: Gregorio Kreiger

        Birthday: 1994-12-18

        Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

        Phone: +9014805370218

        Job: Customer Designer

        Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

        Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.