How to Flush DNS Cache in MacBook Pro

ipad hire picture in picture
How to Enable Picture-in-Picture Mode on iPad for YouTube?
August 3, 2021
The Best Wireless Charging Stand For iPhone
August 19, 2021
rent macbook pro

If you’re experiencing trouble accessing specific websites, clearing your DNS cache may help. This is what it implies and how to accomplish it on a Mac.

  • What are DNS and DNS Cache?

The Domain Name System (DNS) is the Internet’s phonebook. Domain names, such as xyz.com or abc.com, are used by humans to access content online. Web browsers communicate via Internet Protocol (IP) addresses. DNS converts domain names to IP addresses so that browsers may access Internet resources.

Each Internet-connected device has a unique IP address that other machines may use to locate the device. DNS servers reduce the requirement for humans to remember IP addresses like 192.168.1.1 (in IPv4) or more complicated modern alphanumeric IP addresses like 7845:cb99:2788:3::f629:h7c2 (in IPv6). The Domain Name System (DNS) is an important element of the internet since it allows you to map names (the website you’re looking for) to numbers (the address for the website).

A DNS cache (also known as a DNS resolver cache) is a temporary database kept by the operating system of a computer that stores details of all current and attempted visits to websites and other internet domains.

  • Why do you need to Flush DNS?

When you input a website URL into your address bar, your MacBook, laptop, or computer does not know what to do by itself. Rather, it searches for that address on a Domain Name System (DNS) server, which matches it with an IP address that your computer may access.

However, scanning the phone book might take a long time before you discover the correct location. To expedite this procedure, your computer stores some of these entries for future use. This enables your computer to browse previously visited websites without having to query the DNS server each time. Unfortunately, this cache can occasionally create issues.

Perhaps the site you’re visiting has moved servers and is no longer accessible at the cached URL, or you have spyware attempting to reroute popular websites to dangerous sites. If you believe the problem is caused by malware, you should scan using one of these programs. In any event, you may “flush” your DNS cache to restart your computer’s search for web addresses on the DNS server.

Of course, this is not the same as cleaning your web cache in a web browser. If deleting your browser’s cache does not resolve the issue, emptying your DNS cache may be necessary.

  • Flushing DNS Cache on Macs

Most of the time, you don’t need to bother about your Mac’s DNS cache. It operates silently in the background, directing you to the appropriate websites when you request them. However, if it becomes corrupted, you may experience difficulties loading websites or connection issues, with 404 errors being typical. Clearing your Mac’s DNS cache is one option.

It can also be infected with malware, which causes your browser to redirect you to dangerous websites or phishing scams. These issues can be resolved by flushing your Mac’s DNS cache. If your browser refers to dangerous sites, you should also perform a virus scan on your Mac. Here’s how to accomplish it from on macOS.

  • How to flush the DNS cache on a Mac

To clear your DNS cache on macOS Big Sur, follow these steps:

1. To search, use the Spotlight search button or Command+Space.

2. Enter Terminal, and then double-click the Terminal program in the Top Hits list to open it. If you can’t launch Terminal through Spotlight, go to Go > Utilities > Terminal or click Applications, open the Utilities folder, and double-click Terminal.

3. After Terminal is open, type the following command: dscacheutil -flushcache; killall -HUP mDNSResponder

4. To clear the DNS cache, enter your Mac’s password and then click Enter.

  • How to Reset DNS on Older macOS Versions

Older versions of macOS have different commands. To clear the DNS cache on these earlier versions, type the following commands into Terminal:

  • In macOS El Capitan or newer, run sudo killall -HUP mDNSResponder
  • For macOS Yosemite, enter sudo discoveryutil udnsflushcaches
  • In Mac OS Lion, Mountain Lion, and Mavericks, the command is sudo killall -HUP mDNSResponder
  • In Mac OS Snow Leopard, enter sudo dscacheutil –flushcache
  • For MacOS Leopard, run sudo lookupd –flushcache
  • And in Mac OS Tiger, use lookupd –flushcache

After you’ve flushed the DNS cache on your Mac, go back to the problematic website to see whether the problem has been resolved and you may access it normally again.

  • Clearing browser caches with MacKeeper

Clearing browser caches for all of your browsers regularly might be time-consuming. You can delete all caches automatically and quickly with a cache clearing application like MacKeeper.

MacKeeper can examine any files taking up space on your Mac and safeguard you from unintentionally removing critical system files. To use MacKeeper to clean your browser caches, follow these steps:

1. Download MacKeeper and install it on your Mac.

2. Run the tool, then navigate to the cleaning area on the right pane.

3. Select Safe Cleanup.

4. Press the blue Scan Now button.

5. Next, pick all of the caches you wish to delete by checking the Caches box and clicking. User caches, system caches, mail caches, and browser caches are examples of this.

6. Confirm your action by clicking the blue Clean Junk Files icon. MacKeeper will clear all browser caches and remove any trash items preventing your Mac from functioning correctly.

Comments are closed.