How do I flush my DNS?

 

Method 1: Window

  1. Open a command prompt in your window. To open the command prompt easily, follow these steps:
  • Press the window key on your keyboard and then enter this command: cmd.
  • Click “Run as an administrator”.
  1. Now enter the command at the command prompt: ipconfig /flushdns`
  2. It takes time to complete the process, and once it is done, you will see a confirmation message.

 

Method 3: MacOS

  1. Open the Terminal application. If you're having trouble finding it, simply use Spotlight search or the Applications > Utilities folder.
  • You need to type the following command in the Terminal and hit Enter: `sudo killall -HUP mDNSResponder`
  • After executing the command, you may be prompted to enter your administrator password.
  • Once the command is executed successfully, the Terminal will return to the command prompt, indicating that your DNS cache has been flushed.



 Open the Terminal application, and depending on your Linux, you can enter this command:

  • For systemd-resolved systems: `sudo systemd-resolve --flush-caches`
  • For nscd systems: `sudo systemctl restart nscd`
  • For dnsmasq systems: `sudo /etc/init.d/dnsmasq restart`
  • After executing the appropriate command, your DNS cache should be cleared.

Method 3: MacOS

  1. Open the Terminal application. If you're having trouble finding it, simply use Spotlight search or the Applications > Utilities folder.
  • You need to type the following command in the Terminal and hit Enter: `sudo killall -HUP mDNSResponder`
  • After executing the command, you may be prompted to enter your administrator password.
  • Once the command is executed successfully, the Terminal will return to the command prompt, indicating that your DNS cache has been flushed.


To flush the DNS cache in Mac OS X:-

- type dscacheutil -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ dscacheutil -flushcache
- Once you run the command your DNS cache (in Mac OS X Leopard) will flush.


  • 4 Users Found This Useful
Was this answer helpful?