When working with DNS, for example, during a nameserver change, it may be necessary to clear (flush) the DNS on your computer to get the correct DNS for your domain.
Below are two guides to clear your DNS on both Windows and Mac.
Clear DNS on Windows
You can easily clear your DNS via the command prompt.
Therefore, go to the lower left corner and click on the Windows icon.
Then just start typing/searching for "command prompt".
When you find the command prompt, right-click it and run the program as an administrator.
In the command prompt, now type: ipconfig /flushdns
As shown below:
Press enter to clear DNS.
After you press enter, you will receive the following message, and your DNS is now cleared:
Clear DNS on Mac
If you have a Mac, you can clear your DNS in the following way:
- Open Finder on your Mac
- Click on Applications
- Scroll down to the Utilities folder and open it.
- Find the terminal and open it
- Inside the terminal, you should insert/type the following depending on the operating system you use:
- 10.7-10.9, 10.11-10.14 (Lion, Mountain Lion, Mavericks, El Capitan, Sierra, High Sierra, Mojave): sudo killall -HUP mDNSResponder
- 10.10 (Yosemite): sudo discoveryutil mdnsflushcache.
- 10.5-10.6 (Leopard, Snow Leopard): sudo dscacheutil -flushcache
- 10.4 (Tiger): lookupd -flushcache
- Enter your password and click enter
- Click enter again (only necessary sometimes)
You should now see some form of message that your DNS has been cleared.