We all know the struggles of a poor internet connection. Whether you’re streaming video, shopping online or, in the current climate, working from home, a sub-par connection can be incredibly frustrating.
There are tons of tips and tricks articles out there (including our own), but few mention flushing your DNS cache.
Those words might mean nothing to you, but it can prove effective in resetting your connection. In the simplest terms, think of it as as a soft reset of your operating system to ensure it’s running effectively.
Why should I flush the DNS cache?
You might be familiar with the idea of clearing your cache when using a web browser. The likes of Google Chrome and Safari automatically store information about all the websites you visit, including host sites, IP addresses and any resources you access.
However, operating systems do the same, in files known as the Domain Name System (DNS) cache. If you don’t regularly clear this, there is likely to be corrupt or outdated files which present a security risk.
It could also help with connection problems, as clearing the DNS cache means the operating systems is forced to search updated records. This can be effective in solving connection issues or where web content isn’t displayed properly.
How to flush the DNS cache on Windows
Fortunately, the method is incredibly simple across all versions of Windows, so you should be able to do it regularly:
- Press the Windows and R keys to open the Run window
- Remove any currently entered text, type ‘cmd‘ and then hit enter
- In the window that appears, type ‘ipconfig /flushdns‘
- Hit enter again, and if the process is successful you should see the message below
How to flush the DNS cache on Linux
Linux doesn’t cache DNS records, so this will only apply if you install a third-party service.
- Press Ctrl, Alt and T keys together to open the terminal window
- Under the init.d subdirectory, type and enter ‘sudo /etc/init.d/nscd restart’
How to flush the DNS cache on Mac
Unlike on Windows, the command on Mac depends on which version of MacOS you’re running. On all versions this starts by pressing the F4 key, then entering terminal in the search bar.
If you’re on MacOS Catalina, High Sierra, Sierra, El Capitan, Mavericks, Mountain Lion or Lion, enter the following: ‘sudo killall -HUP mDNSResponder’
On MacOS Yosemite, the command is: ‘sudo discoveryutil udnsflushcaches‘
You’ll need this on MacOS Snow Leopard: ‘sudo dscacheutil -flushcache‘
Finally, enter the following if you’re running MacOS Leopard and below: For anyone still running MacOS Leopard (2007) or older, enter: ‘sudo lookupd -flushcache‘
If that didn’t work, see more of our tips on how to speed up your internet.