News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Flushing the DNS Cache on a Mac

    Posted on Nathan Parker Comment on the AskWoody Lounge

    Home Forums AskWoody support Non-Windows operating systems macOS Flushing the DNS Cache on a Mac

    Viewing 3 reply threads
    • Author
      Posts
      • #2110049 Reply
        Nathan Parker
        AskWoody_MVP

        I needed to recently flush the DNS cache on a couple of my Macs, so I thought I’d post the instructions for this weekend’s Mac column.

        The best instructions I’ve found that works are these from OpenDNS:

        https://support.opendns.com/hc/en-us/articles/227988627-How-to-clear-the-DNS-Cache-

        They also include instructions for Windows and Linux.

        The instructions for Sierra also work for High Sierra and Mojave, and they should work for Catalina as well.

        I’ve seen other instructions out there on the web, but these have been the quickest and ones that seem to work the best.

        Nathan Parker

        4 users thanked author for this post.
      • #2110098 Reply
        Bluetrix
        AskWoody MVP

        I hope I don’t delete this myself for being slightly off topic … I use/installed opendns on my machine, and it ain’t a Mac. 🙂

        It is a very professional site and I trust the information they have.

        1 user thanked author for this post.
        • #2110102 Reply
          OscarCP
          AskWoody Plus

          So “opendns” is a site one can go to and use their sort of trusty car-wash for DNS caches?

          I don’t allow accepting 3rd party cookies and use Add Blocker Plus in all of my browsers: Waterfox, FF and Chrome — Safari I never use in the Mac, because I have enough with the ones just mentioned, and when running Windows, IE11 has been, for a while now, no longer the best one for what I need to do on the Web. I have Waterfox as my default in the Mac and on the Windows side of the PC, and FF on the Linux side of the same.

          But I am concerned that washing my DNS caches will force me to re-enter the login information every time I try to access a few places where I have accounts one must log in to before being able to do anything in them, when using any of the browsers I have set to remember their corresponding User IDs and Passwords.

          Windows 7 Professional, SP1, x64 Group W (ex B) & macOS + Linux (Mint)

      • #2110156 Reply
        Paul T
        AskWoody MVP

        DNS cache has nothing to do with logging in, that is cookies.

        There is generally no need to flush the DNS unless you are doing some “interesting” network stuff, but rebooting will do it.

        cheers, Paul

        1 user thanked author for this post.
        • #2110198 Reply
          OscarCP
          AskWoody Plus

          Thanks for clarifying this point.

          So, the DSN cache function is to keep a record and corresponding information of sites recently visited to speed up the connection to any of those sites next time one wants to reconnect to it. But it does not keep any of the cookies that may be attached to one’s computer during those visits. Those are kept somewhere else. This appears to be based on the simplistic assumption that if one has visited the site recently is likely to visit it again (but we are discussing the way computers work, something that is not necessarily very nuanced). This being so, is the main reason for flushing the DSN cache to erase one’s Internet tracks? Or is it to get rid of corrupt entries, perhaps put there with a virus, to redirect the browser to sites other than the ones intended, in order to attempt a phishing scam on the unwary and, or infect the computer with malware, including ransomware?

          Or are there other common reasons besides those two? In other words: why is it important to clean the DSN cache, and how useful is to do so?

          Windows 7 Professional, SP1, x64 Group W (ex B) & macOS + Linux (Mint)

          • #2110208 Reply
            jabeattyauditor
            AskWoody Lounger

            Oscar, you flush DNS when you’ve made local networking changes, such as changing the IP or name of a server. Your system “remembers” its at a different IP – you flush your DNS cache so when it looks for that same device, it knows where to find it.

            This is less likely to happen in a home network environment than in the corporate world.

            2 users thanked author for this post.
            • #2110335 Reply
              OscarCP
              AskWoody Plus

              My thanks to  you as well, jabeattyauditor.

              I must admit that, in all my years sitting in front of the monitor’s screen and pounding on the keyboard of any of my successive computers, this has been the very first time that I’ve come across any mention of a ‘DSN cache’, or of the need of and method for flushing this cache. All the time I had been thinking that deleting the browsing history and the cookies that get invariable attached, like barnacles, to a browser’s hull, would take care of everything: deleting both the record of visited sites and the cookies, because I was convinced that the history kept by the browser was what took care of speeding up the connections.

              Live and learn.

              Windows 7 Professional, SP1, x64 Group W (ex B) & macOS + Linux (Mint)

            • #2110518 Reply
              Paul T
              AskWoody MVP

              The DNS cache is to take the load off your DNS server and speed up network connections.

              Me: Go to http://www.askwoody.com
              Computer: Where is that? I’ll ask the DNS.
              DNS: It’s at IP address x.x.x.x
              Computer: I’ll cache that info to save having to look it up next time.

              cheers, Paul

              1 user thanked author for this post.
              • #2110530 Reply
                OscarCP
                AskWoody Plus

                Thanks, again. If I understand this correctly now, the browser keeps only the URL but not the IP number (this seems inefficient, but there has to be a good reason for it). So the system uses the DNS cache (a data base with entries created as Web sites are accessed with the browser) to find the IP number, perhaps among recent entries, that corresponds to the URL the user wishes to connect to. The IP number is the Internet address meant to be “understood” by machines — such as DNS servers — while the URL is a descriptive handle of the destination, meant to be understood by people.

                Windows 7 Professional, SP1, x64 Group W (ex B) & macOS + Linux (Mint)

              • #2110532 Reply
                Paul T
                AskWoody MVP

                Network comms is via MAC address – the unique address of your network card.
                IP is used as a mechanism to map the MAC to networks and paths to networks.
                DNS is our easy for humans to read / remember layer on top.

                This was in place way before the internet appeared, but newbies (and plenty of middlies and oldies) don’t know about “the time before Internet”.  🙂

                cheers, Paul

                1 user thanked author for this post.
      • #2110437 Reply
        Nathan Parker
        AskWoody_MVP

        Thanks for clarifying that. I probably should have clarified as to when one (seldom) needs to flush their DNS cache. I had to do some deep network changes recently, so that’s why I had to flush mine on a couple of devices.

        Nathan Parker

        1 user thanked author for this post.
    Viewing 3 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Flushing the DNS Cache on a Mac

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.