I love playing with various OS’s and in OSX is on top of my list. During the day I am managing IT from my old trusted Lenovo ThinkPad with Windows. At night I am using my MacBook PRO. And I love it. The more and more I use it for various tasks the more I am looking for alternatives to Windows commands.
Flushing your dns is a very useful troubleshooting step and is necessary for some network changes to take effect. For some odd reason, Apple likes to change the command to clear the dns cache with just about every OS update, so here is the updated command. In such cases, flushing your Mac OS DNS cache may be necessary to pick-up the updated entries without waiting for the TTL to expire. Unfortunately, there is not one consistent way to do it as it will depend on which Mac OS version you are running.
Why would you flush DNS cache in the first place?
Whenever there is a change in DNS, for example you change IP ADDRESS of a website, DNS is still caching old entry. But when you flush it, all the records are gone, then DNS will have to query DNS again to obtain the latest address.
I was asked by my friend how to flush DNS in Mac OS X… I didn’t know, I admit. In the end it’s fairly easy.
Flush DNS in Mac OS X Snow Leopard 10.6
Open terminal and type:dscacheutil -flushcache
this is quite similar to windows, instead of ipconfig /flushdns you type dscacheutil -flushdns
Flush DNS in OS X Lion (10.7) and OS X Mountain Lion (10.8)
With Lion, there is a bit more typing to do. Luckily same applies to Mountaion Lion as well.
sudo killall -HUP mDNSResponder
dscacheutil still works in 10.8 and 10.7 but official method is to kill mDNSResponder. As alternative you can kill process in Activity monitor.
Flush DNS in OS X 10.9 Mavericks
If you are running 10.9 version of OS X, you will have to type even more, by executing command below you will do two things: 1. You will flush cache 2. then you will reload DNS for changes to come in effect.
dscacheutil -flushcache;sudo killall -HUP mDNSResponder
How to clear DNS cache in OS X 10.10 Yosemite
To completely clear DNS cache in OS X 10.10, you will have to target MDNS – Multicast DNS and UDNS -Unicast DNS with two different commands but they can be merged in to one. Open terminal and type:
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed
You can also type each command separately.
In order to clear MDNS cache type in the following command:
sudo discoveryutil mdnsflushcache
In order to clear UDNS cache type in the terminal the following command:
sudo discoveryutil udnsflushcaches
Yes, it’s not a mistake, you have to use plural
How to clear IOS DNS cache
IOS does not have a terminal which you can use to type in commands like in OS X. One solution which will work on IOS is to restart the device. But in this case, it will take a lot of time.
What you can do is to enable and disable flight mode. Go to Settings, Airplane mode and turn it ON. Wait for several seconds and turn Flight mode OFF. This will clear DNS cache. In IOS version 7 and above, you can pull up new menu at the bottom (quick access) and press first icon on the left – flight mode. Wait for several seconds, and press it again to turn flight mode off. You can use this method to clear DNS cache on iPhone and iPad.
Related
Summary :
When you encounter a network connection issue, you can flush DNS to solve it. However, do you know how to flush DNS on your PC? In this post, MiniTool Solution will show you how to flush DNS on Windows 10, Windows .1/8, Windows 7, Windows Vista, Windows XP, and macOS.
To solve some issues, you may need to clear caches and cookies for your web browser and modify some settings. But this may lead to another issue: network connection becomes unavailable. In a situation like this, you can flush DNS to reset IP to make everything back to normal.
In this post, we will show you how to flush DNS on Windows and Mac.
However, if you are using a public or shared computer, you will need to ask the network administrator to do the job.
How to Flush DNS on Windows 10, Windows 8.1, and Windows 8?
If you are using Windows 10, 8.1, 8, you can follow these steps to reset IP/flush DNS:
1. Search for cmd using Windows Search and select Run as administrator.
2. Click Yes if you see the User Account Control
3. Type the following flush DNS command one by one and press Enter after each input.
ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew
netsh winsock reset
4. Reboot your PC.
How to Flush DNS on Windows 7?
If you are using Windows 7, you can follow this guide to flush DNS on your computer:
1. Click Start.
2. Go to All Programs > Accessories.
3. Find Command Prompt and right-click on it. Then, select Run as administrator.
4. If you receive an interface that asks whether to allow this program to make changes to your computer, you need to click Yes to continue.
Note: If an administrative login is needed, you need to contact your system administrator.
5. Type the following flush DNS command one by one and press Enter after each input.
ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew
6. Reboot your PC.
How to Flush DNS on Windows XP and Vista?
If your computer is still running Windows XP or Windows Vista, you need to follow these steps to flush DNS:
Flush It Mac Os Download
- Close all the opened web browsers on your computer.
- Click Start and then go to All Programs > Accessories > Command Prompt.
- Type the flush DNS command ipconfig /flushdns and press Enter.
If the command is executed successfully, you will receive a message saying DNS Resolver Cache Successfully Flushed. But if see Action Requires Elevation, you will need to contact the administrator of your computer to ask for help.
How to Flush DNS on Mac OS X?
If you are using a Mac computer, you need to follow this guide to flush DNS to reset IP:
1. Close all web browsers on your computer.
2. Click Application and then go to Utilities > Terminal.
3. When the Terminal window is opened, you need to type the correct flush DNS command in different Mac OS X versions:
- If you are using OS X 10.11 - 11.0 (Catalina, Sierra, High Sierra, Mojave, Catalina, and Big Sur), you need to type sudo killall -HUP mDNSResponder.
- If you are using OS X 10.10 (Yosemite), you need to type sudo discoveryutil mdnsflushcache.
- If you are using OS X 10.7 - 10.9 (Mavericks, Mountain Lion, and Lion), you need to type sudo killall -HUP mDNSResponder.
- If you are using OS X 10.6 and older, you need to type sudo dscacheutil –flushcache.
4. Press Enter.
Flush It Mac Os Pro
After these steps, the DNS cache should be flushed.
Other Things You May Need to Do
However, if the network connection issue is not solved after you lush DNS, you may need to run a power cycle for your modem and router.
- Shut down your computer.
- Turn off your modem and router and wait for about 15 seconds.
- Plugin your modem and then wait for about 2 minutes.
- Plugin your router and then wait for about 2 minutes.
After these steps, you can open your computer to check whether the network connection issue is solved.