Caches are incredibly useful ways of optimising the experience of browsing websites, as they store often-accessed data in a memory location that can be accessed more quickly than always returning the access request to the server.
That means faster load times, as a device can store a local copy, so the site data requested by the browser can be retrieved and displayed more quickly on subsequent visits.
However, caching isn’t without its downsides, as information can get outdated and cause connection issues, come under threat from attack, or make it easier for hackers to track online behaviours.
What is a DNS Cache?
Your Domain Name System (DNS) translates the domain name of a website into an IP address, so the browser knows where to direct you.
You can read our full explainer on DNS here.
A DNS cache, therefore, is a temporary store within your operating system of previous DNS lookups. It contains several components (which you will be able to find within the DNS Zone editor).

These are:
- Record Name: a DNS entry’s domain name
- Record Type: a DNS entry’s record type, which will be either A or AAAA
- Resource data: a DNS entry’s description, containing the address and hostname
- Resource data length: refers to the resource data’s value
- Class: the protocol group of your resource record
- Time to live (TTL): the length of time (in seconds) that the record is valid for
Do you need to flush your DNS?
Most of the time, you don’t have to worry about flushing your DNS. That’s because your DNS cache will automatically renew itself based on the TTL, refreshing the data it has stored in an effort to ensure that its cached results aren’t out of date. Plus, if you reboot the DNS server at any time, your DNS cache will automatically clear.
Although a DNS cache reduces load times for frequently visited sites, flushing the DNS won’t have a hugely noticeable impact on your overall internet browsing speed. So, should you find yourself needing to flush DNS, you should do so in the confidence that it won’t adversely affect your browsing experience.
As some issues can occur before the TTL is up, there are a few situations in which learning how to flush DNS can be beneficial. Manually flushing the DNS cache will force the cache to clear, so you’ll be able to access just the live sites, rather than your stored version.

One hosting platform for your agency.
Our platform was designed with your needs in mind, which means it’s easy to use, and time-saving too.When to flush the DNS
While there’s not usually a need to worry about making the change yourself, there are a few situations that might prompt you to flush the DNS manually.
If you’re experiencing one of the following, you might want to consider a DNS cache flush:
1 Seeing a 404 error
404 errors – ‘page not found’ – occur when a browser is able to successfully communicate with a server, but that server has not been able to locate the requested page or file.
In the case of DNS caching, this may well be because the live version of the site no longer matches the cached version stored on your device. Perhaps it has moved to a new domain name, or changed web host.
After a while, this kind of error will seem to solve itself, as the information stored within your DNS cache is updated. However, by flushing the DNS you don’t have to wait for this update to happen.
2 Wanting to browse in private
DNS caching can be understood to be a form of tracking – it reveals your search history with its list of saved information from the sites you’re regularly visiting.
Learning how to flush DNS, and doing so regularly, can keep this kind of information private – and stop data collectors being able to track your habits via your cached sites.
3 Preventing DNS spoofing
Also known as DNS cache poisoning, DNS spoofing describes the act of putting false information into the DNS cache. It’s a particularly malicious attack, as it allows the attacker to divert traffic from a legitimate server, to a fake one.
By redirecting the data in the DNS to their IP address, users become at risk of phishing attacks. Sites that are created to resemble the real one can be used to farm sensitive information, as users are prompted to login to their accounts, wherein their credentials are stolen. In the case of financial information, like online banking passwords, this can result in significant losses.
How to flush DNS cache
Different operating systems have different ways of flushing the DNS. In these step-by-step guides, we’ll explain how to flush DNS using common operating systems – and a couple of browsers, too (which you should do in conjunction if you regularly use them).
How to flush DNS in Microsoft Windows XP, 7, Vista, 8, 8.1 or 10
The process for flushing DNS in Windows is largely similar across most versions. To begin, you’ll have to use the ‘run as administrator’ option during the command prompt in order to access the system security permissions you’ll need.
- Use the Windows + R shortcut to open the ‘Run’ window
- Type ‘cmd’ to open Windows Command Prompt
- Type the following command, and hit ‘Enter’: ipconfig /flushdns
How to flush DNS in macOS X
The command prompt you’ll need to run differs depending on which software version your Mac is running. (You can find out which you need by clicking the Apple icon in the top left corner, followed by ‘About this Mac’.)
- Open ‘Finder’, and click ‘Applications’
- Open ‘Terminal’ within the ‘Utilities’ folder
- Type in the following command (depending on which macOS you’re running):
- 0.7-10.9, 10.11-10.14 (Lion, Mountain Lion, Mavericks, El Capitan, Sierra, High Sierra, Mojave): sudo killall -HUP mDNSResponder
- 11 (Big Sur) or 12 (Monterey): sudo dscacheutil -flushcache; 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 hit ‘Enter’
How to flush DNS in Linux
Linux is a popular operating system – and the one which powers Android devices. It doesn’t cache DNS records by default, but you can choose to manually install a DNS service – which you’ll then have to access via the ‘Terminal’ application (Ctrl + Alt + T) in order to flush.
-
- Once you’ve opened the ‘Terminal’ window, type in one of the following commands (depending on which service your Linux system is using):
- NCSD: sudo /etc/init.d/nscd restart
- Dnsmasq: sudo /etc/init.d/dnsmasq restart
- BIND: You may have to try multiple commands:
- Once you’ve opened the ‘Terminal’ window, type in one of the following commands (depending on which service your Linux system is using):
- sudo /etc/init.d/named restart
- sudo rndc restart
- sudo rndc exec
-
- Systemd: systemd-resolve –flush-caches
- You may be prompted to enter your password before the reset will occur
Get expert hosting tips delivered directly to your inbox.
How to flush DNS in your browser
How to flush DNS in Google Chrome
Although Google Chrome is not itself an operating system, it does keep its own DNS cache, which means that if you regularly use it – or have it as your default browser – it’s worth flushing its separate DNS cache too.
- Navigate to this address via your browser: chrome://net-internals/#dns
- Click the ‘Clear host cache’ button
How to flush DNS in Firefox
If Firefox is your default browser, learning how to flush DNS is even easier, as the cache is not kept on the disk as therefore it’s as simple as just restarting your browser. However, if you’d prefer not to restart your browser, you can follow similar steps to the Google Chrome process:
- Navigate to this address via your browser: about:networking#dns
- Click the ‘Clear DNS Cache’ button
How to flush DNS in Microsoft Edge
There are two different ways to flush the DNS if Microsoft Edge is your default browser – depending on whether you use Edge Chromium or the Edge legacy browser.
A clean slate

Once your DNS cache has been flushed, you’ll be effectively starting from scratch when you visit each website. That means that load times may be slightly longer at first – but don’t worry, the cache will begin to fill again once you get back to browsing, so you’ll soon be back to normal.
And if a client reports trouble viewing an updated version of their site, guiding them through the process of flushing DNS should help get things back to running smoothly.