How to Perform a DNS Cleanup on Your Mac - Detailed Instructions
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
How to Perform a DNS Cleanup on Your Mac - Detailed Instructions
What to Know
- You can delete the DNS cache through Terminal. PressCommand +Space to search for it.
- Enter this flush DNS command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- El Capitan and older Mac OS X systems use different commands to clear DNS.
This article explains how to delete theDNS cache on a Mac.
How to Use the macOS Flush DNS Command
If you’re experiencing internet connectivity issues, you may be able to fix them by resetting theDNS cache with aTerminal command . It should only take a few moments.
- Open Terminal . One quick way is to pressCommand +Space to launchSpotlight . Then, typeTerminal and select it from the results.
You can also access Terminal by navigating toGo >Utilities >Terminal .
- Type (orcopy and paste ) this command into Terminal and then pressEnter :
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
This command only works inmacOS 10.12 Sierra and newer. If you have an older version, check the next section for the correct command.
- Type your password and then pressreturn . The DNS cache will be reset immediately, but there will be no message to that effect. When a new line appears, it indicates the command has been carried out.
The password will not appear in Terminal as you type it.
How to Flush DNS on Mac OS X
The Mac OS X flush DNS command is different than the one used in modern versions of the operating system. Open Terminal and then enter the command that corresponds with your version:
- El Capitan : sudo killall -HUP mDNSResponder
- Yosemite : sudo discoveryutil udnsflushcaches
- Lion, Mountain Lion, and Mavericks : sudo killall -HUP mDNSResponder
- Snow Leopard : sudo dscacheutil -flushcache
- Leopard : sudo lookupd -flushcache
- Tiger : lookupd -flushcache
What Does Flushing DNS Do?
Each time you access a website in your web browser, the URL you enter is sent to aDNS server for translation into anIP address . This information is stored in a cache on your Mac for easy retrieval in the future, hence the term_DNS cache_ .
When you try to access a website you’ve been to recently, your Mac uses its DNS cache instead of checking with an actual DNS server. The web browser doesn’t have to go through the extra step of communicating with a remote DNS server, which results in less time between entering a website address and the website loading.
If the local DNS cache is corrupt or outdated, it’s kind of like trying to use an old phone book that’s been vandalized. Your web browser checks the cache to find an IP address for the website you’re trying to visit, and it finds either the wrong address or an unusable one. This can slow the process down or prevent websites or specific web page elements, like videos, from loading.
When you flush your DNS cache, you instruct your Mac to delete its local DNS records. This in turn forces your web browser to check with a DNS server for fresh information. You should always flush your DNS cache afterchanging the DNS servers on your Mac . It can also be helpful if you’re having connectivity problems.
FAQ
- How do I check the DNS cache on a Mac?
Open the built-in Console log-viewer app on your Mac and typeany:mdnsresponder into the search bar. Then, launch Terminal, type insudo killall –INFO mDNSResponder , and pressEnter orReturn . Back in the Console app, you can view a list of cached DNS records. - How do I clear the DNS cache on Windows 10?
Toclear the DNS cache on Windows 10 , open the Run dialog box, type inipconfig /flushdns , and clickOK . You can also use the same command in the Windows command prompt if you want more information on the process. - What is DNS cache poisoning?
DNS cache poisoning, also known as DNS spoofing, is when someone deliberately enters false or incorrect information into a DNS cache. After the false information is input, future DNS queries will return incorrect responses and direct users to the wrong websites.
Was this page helpful?
Thanks for letting us know!
Get the Latest Tech News Delivered Every Day
Tell us why!
Other Not enough details Hard to understand
Submit
Also read:
- [Updated] 2024 Approved FCP's Ultimate Editing Aid Best 10 Plug-Ins
- [Updated] 2024 Approved Synergizing Visual Elements Best Text Plugins Reviewed
- 2024 Approved Add Personality to Your Device A Comprehensively Tailored Sound & Ringtone Guide for Android
- A Chronological Guide to Apple's iOS Development: Discovering Changes From Version 1.0 to 18.0
- Best Automated Clicking Solutions on Android Without Rooting
- Cellular Network Not Available for Voice Calls On Realme C53 | Dr.fone
- Decoding the Secrets of Masterful WINDOWS 10 Use
- Diagnosing and Repairing the 'Disc Drive Not Found' Problem in Steam Installs
- Discover Your Display's Pixels: Effortless Guide to Determine Screen Resolution
- How To Remove Screen Lock PIN On Realme GT 3 Like A Pro 5 Easy Ways
- How To Reset the Security Questions of Your Apple ID From Your Apple iPhone 13 Pro Max
- In 2024, Facebook Story Viewer View Facebook Stories Anonymously
- In 2024, How To Unlock Samsung Galaxy M34 5G Phone Without Password?
- Resolving lame_enc.dll Issues in Audacity - An In-Depth Guide
- Snapchat on Windows or Mac: A Comprehensive Walkthrough to Enable Mobile App Usage on Desktop
- The Essential Tutorial on Wiping and Refreshing BIOS Memory for Optimal Performance
- Troubleshooting and Repairing Missing d3dx9_^.dll Errors on Your Computer
- Ultimate Guide: The Top 8 Travel Planner Apps to Enhance Your Adventures
- What's New in Windows: Insight on July 2024 Service Packs & Patches
- Title: How to Perform a DNS Cleanup on Your Mac - Detailed Instructions
- Author: James
- Created at : 2024-09-21 02:56:42
- Updated at : 2024-09-26 22:26:38
- Link: https://technical-tips.techidaily.com/how-to-perform-a-dns-cleanup-on-your-mac-detailed-instructions/
- License: This work is licensed under CC BY-NC-SA 4.0.