Your Search Bar For Shrewd Tips

How Do I Clear Dns Cache?


If a website will not load, points to an old server, or behaves differently on one device than another, a stale DNS cache may be the cause. Clearing the DNS cache—also called flushing DNS—removes saved address records so your device can request fresh information. The steps depend on your operating system, and in some cases you may also need to clear your browser’s cache or restart your router. Here is how to clear DNS cache on Windows, Mac, Linux, and mobile devices, plus what to try if the problem continues.

What Is a DNS Cache?

The Domain Name System (DNS) translates website names, such as example.com, into the numerical IP addresses computers use to find servers. A DNS cache temporarily stores the results of those lookups. Your device can then revisit a website without asking a DNS server for the same information every time.

Caching makes browsing faster, but a saved record can occasionally become outdated. For example, a website may move to a new server while your device still has the previous address stored. Clearing the cache removes those saved records. The next time you visit a site, your device requests updated DNS information.

When Should You Clear Your DNS Cache?

Flushing DNS can help when a site has recently changed its hosting or IP address, when a domain does not resolve, or when you see an error such as “server IP address could not be found.” It may also help if one device cannot reach a website that works on another device using the same network.

However, DNS is only one possible cause of website problems. A site may be down, your internet connection may be interrupted, or a browser extension, firewall, VPN, or security app may be interfering. Clearing DNS is safe and quick, but it will not fix every connection issue.

How to Clear DNS Cache on Windows

On Windows 10 and Windows 11, use the Command Prompt or Windows Terminal to flush the DNS resolver cache:

  • Open the Start menu and search for Command Prompt or Windows Terminal.
  • Select Run as administrator if Windows asks for elevated access.
  • Type ipconfig /flushdns and press Enter.
  • Look for a message confirming that the DNS Resolver Cache was successfully flushed.

You can also open PowerShell as an administrator and run the same command. Then close and reopen your browser and try the website again. Flushing DNS does not delete bookmarks, saved passwords, browsing history, or personal files.

How to Clear DNS Cache on a Mac

On current versions of macOS, you can clear the system DNS cache using Terminal. Open Applications > Utilities > Terminal, enter the command below, and press Return:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your Mac administrator password if prompted. Terminal will not display the characters as you type, which is normal. Press Return after entering the password. You may not see a success message; close Terminal, restart your browser, and test the site.

These commands are commonly used on modern macOS releases. If your Mac is running an older version, the appropriate command may differ. Restarting the Mac is a simple alternative that can refresh its system services.

How to Clear DNS Cache on Linux

Linux does not use one universal DNS caching service. The right method depends on your distribution and how DNS is configured. Many recent distributions use systemd-resolved. To flush its cache, open a terminal and run:

sudo resolvectl flush-caches

On some older systems, the equivalent command is sudo systemd-resolve --flush-caches. If neither command is available, your system may use a different resolver or caching service.

For example, systems using nscd may support sudo systemctl restart nscd, while systems using dnsmasq may need that service restarted instead. The service name and command can vary by distribution. If you are unsure which resolver is active, check your distribution’s documentation or ask your system administrator before changing network services.

How to Clear DNS Cache in a Web Browser

Browsers can keep their own DNS or connection information, separate from the operating system’s cache. If you have flushed the system cache but a website still appears to use an old address, restart the browser first. You can also try a private or incognito window to check whether the issue is related to stored browser data or an extension.

  • Google Chrome: In some versions, enter chrome://net-internals/#dns in the address bar and select the option to clear the host cache if it is available.
  • Microsoft Edge: Try edge://net-internals/#dns and use the available host-cache option, if shown.
  • Firefox: Enter about:networking#dns and select Clear DNS Cache.
  • Safari: Safari relies on macOS networking services for DNS. Flush the Mac’s DNS cache or restart the Mac, then reopen Safari.

Browser settings and internal tools can change between versions. If a page or button is missing, restart the browser and use the operating system instructions instead. Clearing browser cookies or all browsing data is usually unnecessary for a DNS issue.

How to Clear DNS Cache on Android and iPhone

Most phones do not offer a consistent, dedicated “flush DNS” button. The available options depend on the device, operating system version, browser, and network configuration. Start with simple steps: turn Airplane Mode on for a few seconds and then turn it off, or restart the phone. These actions can refresh the network connection, though they do not guarantee that every DNS cache has been cleared.

On Android, check whether a VPN, ad blocker, or custom Private DNS setting is active. You can find Private DNS in the network settings on many Android devices, but menu names vary by manufacturer. If you use a DNS or VPN app, temporarily disconnect it to test whether it is affecting access.

On iPhone, restarting the device is a practical first step. You can also disconnect and reconnect to Wi-Fi or test the website using cellular data. Resetting network settings is a more disruptive option: it removes saved Wi-Fi networks and related network configurations, so use it only after simpler troubleshooting and make sure you know your Wi-Fi password.

Should You Restart Your Router?

Your router may store DNS results or provide DNS forwarding for devices on your network. Restarting it can refresh its network connection and may clear its temporary DNS information. To try this, use the router’s restart option or unplug it briefly, then reconnect it and wait for it to come back online.

A router restart does not always clear DNS cache, and it may interrupt internet access for everyone using the network. If the problem affects only one device, flush that device’s DNS cache first. If several devices on the same Wi-Fi network cannot reach the same site, restarting the router or checking its DNS settings may be more useful.

What to Do If Flushing DNS Does Not Work

If the website still will not load, work through these checks before making major changes:

  • Confirm that your internet connection works by visiting a few unrelated websites.
  • Try the affected website on another device or network, such as cellular data.
  • Restart your browser and device, then test again.
  • Temporarily disconnect a VPN or proxy, if you use one.
  • Check whether security software, parental controls, or a browser extension is blocking the site.
  • Try another DNS server only if you understand the change or have been advised to do so by your network administrator.

If the site fails on multiple devices and networks, the issue may be with the website itself. If it fails only on a work or school network, an administrator may be filtering DNS requests. Avoid changing managed network settings without permission.

Is It Safe to Clear DNS Cache?

Yes. Clearing DNS cache is a routine troubleshooting step and does not remove personal files or change your saved passwords. After the cache is cleared, the first visit to a website may take slightly longer because your device has to look up its address again. The cache will gradually fill with fresh records as you browse.

Use commands only for the operating system and service they are intended for. In particular, Linux commands depend on the DNS resolver in use, so do not restart unfamiliar network services without checking what they do.

Conclusion

To clear DNS cache, use ipconfig /flushdns on Windows, the appropriate Terminal command on macOS, or the resolver-specific command on Linux. On phones, start by toggling Airplane Mode or restarting the device, and remember that browser and router caches may also play a role. Once you flush DNS, reopen your browser and test the site. If the issue remains, check your connection, VPN, security settings, and whether the website is available elsewhere.


Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.

Shrewdnia

Shrewdnia

Shrewdnia is a destination for curious minds seeking clarity, knowledge, and informed perspectives. Through insightful articles and practical guides our passionate team explores a wide range of topics designed to help readers understand the world around them, make smarter decisions, and stay informed in an ever-changing landscape.


💡 Every question sparks discovery, and every perspective enriches the conversation. Share your thoughts and insights in the comments 👇

Back to blog

Leave a comment

JOIN THE SHREWDNIA COMMUNITY FORUM

What do you think?

Have an opinion, experience, or question about this topic? Join the Shrewdnia Forum and share your thoughts with other readers.

Join the Forum →