If a website will not load, opens the wrong page, or seems stuck after you have changed its address, you may be wondering, “How do I clear DNS?” Clearing the DNS cache removes saved records that help your device find websites. Your computer or phone can then request fresh information, which may fix certain connection problems. The steps depend on your operating system, browser, or router, so start with the option that matches the device you are troubleshooting.
What Is DNS, and Why Clear the DNS Cache?
DNS, short for Domain Name System, translates a website name such as example.com into the numerical IP address computers use to connect to it. To make repeat visits faster, your device may temporarily save DNS lookups in a cache. Browsers, operating systems, and routers can each keep their own DNS information.
Most of the time, caching works quietly in the background. But a saved record can occasionally be outdated or incorrect. For example, a website may have moved to a new server, a network administrator may have updated a domain, or a recent DNS change may not have reached your device yet. In these situations, clearing the cache prompts your device to look up the address again.
Flushing DNS is a troubleshooting step, not a general internet speed boost. It usually does not delete files, saved passwords, or browser history. It also does not change your DNS provider or fix every kind of connection issue. If the site is down, your internet connection is interrupted, or the problem is caused by a firewall, clearing DNS may not help.
How to Clear DNS on Windows
On Windows 10 and Windows 11, you can flush the operating system’s DNS cache with Command Prompt or Windows Terminal. You may need administrator access, depending on your computer’s settings.
- Open the Start menu and search for Command Prompt or Terminal.
- Choose Run as administrator if the option is available.
- Enter the command below and press Enter.
ipconfig /flushdns
Windows should report that it successfully flushed the DNS Resolver Cache. Close and reopen your browser, then try the website again. If you receive an error, check that you typed the command correctly and opened a suitable command window.
You may also see advice to release and renew your IP address. Those are separate network troubleshooting commands and are not usually needed just to clear DNS. Try the DNS flush first, and only use other commands when you have a specific connection problem or have been instructed to do so.
How to Clear DNS on macOS
On current versions of macOS, you can clear the system DNS cache using Terminal. The command may ask for your Mac administrator password. When you type a password in Terminal, characters may not appear on screen; enter it and press Return.
- Open Applications, then Utilities, and launch Terminal.
- Enter the command below and press Return.
- Type your administrator password if prompted, then press Return again.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
The command generally gives no success message. That is normal. Quit and reopen your browser, then test the site. macOS commands can differ across releases, so if this command does not work on your version, check Apple support guidance for your specific macOS release rather than running unfamiliar commands.
How to Flush DNS on Linux
Linux does not use one universal DNS caching service. The right method depends on your distribution and which services are running. On many systems using systemd-resolved, open a terminal and run:
sudo resolvectl flush-caches
On some older systems, the equivalent command may be:
sudo systemd-resolve --flush-caches
Other Linux setups may use a local DNS service such as dnsmasq or nscd. If the commands above are not recognized, your system may not use systemd-resolved, or it may not have a local DNS cache to flush. Check your distribution’s documentation to identify the active resolver before restarting services or changing network settings.
How to Clear DNS in a Web Browser
A browser may keep DNS information separately from the operating system. If one browser has trouble reaching a site while other apps work, clearing the browser’s DNS cache can be a useful next step. Browser menus and internal pages can change between releases, so these options may look different on your device.
-
Google Chrome: Try opening
chrome://net-internals/#dnsin the address bar. If the DNS page is available, choose the option to clear the host cache. -
Microsoft Edge: Try
edge://net-internals/#dnsand use the available option to clear the host cache. -
Mozilla Firefox: Open
about:networking#dns, then select Clear DNS Cache if the option is shown.
Afterward, close and reopen the affected tab or browser. If the browser’s DNS controls are unavailable, fully quitting and restarting the browser may be enough to refresh its temporary data. You can also test the website in a private window or a different browser to see whether the issue is limited to one app.
Clearing DNS is different from clearing cookies or the browser cache. Cookies can sign you out of websites, and clearing cached images or files may make pages load more slowly the next time. You usually do not need to remove either of those to refresh DNS records.
How to Clear DNS on Android and iPhone
Mobile operating systems generally do not provide a simple, universal “flush DNS” button. A practical first step is to turn Airplane Mode on for a few seconds and then turn it off. This reconnects the phone to the network and may prompt it to make fresh lookups. Restarting the phone is another straightforward option.
On Android, the exact network controls vary by manufacturer and version. If you use Private DNS, remember that it determines which DNS service your phone uses; changing that setting is not the same as clearing the cache. Avoid switching providers unless you understand the setting or are following trusted troubleshooting advice.
On an iPhone, toggling Airplane Mode or restarting the device may refresh the connection. Resetting network settings is a more extensive step, not a routine DNS flush. It can remove saved Wi-Fi networks and passwords, along with other network preferences. Use it only when simpler checks have failed and you are prepared to reconnect to your networks.
How to Clear DNS on a Router
Your router may cache DNS records for devices on your home network. To refresh it, use the router’s normal restart process: unplug its power, wait about 30 seconds, then reconnect it. Give the router a few minutes to start up and restore internet service before testing the website.
A restart is usually enough for basic troubleshooting, but it will briefly disconnect every device using that router. Do not press and hold the reset button unless you intend to restore factory settings. A factory reset can erase your Wi-Fi name, password, and other configuration. If only one device has the problem, try clearing that device’s cache first instead of interrupting the whole network.
Some routers provide DNS controls in an administrator dashboard, but the location and available options vary by model. Avoid changing DNS server addresses simply to clear cached records. If you do not recognize a setting, consult the router manufacturer’s instructions or your internet provider.
What to Do If Clearing DNS Does Not Work
If the site still will not load, use a few simple checks to narrow down the cause before making more changes:
- Check whether other websites and apps can connect to the internet.
- Try the problem website on another device or network, such as mobile data.
- Check the website’s address for spelling mistakes and look for a service outage notice.
- Restart the browser and device, and make sure the browser is up to date.
- Temporarily pause a VPN or proxy only if you trust the network and understand the effect.
- Contact your internet provider or workplace IT team if multiple devices have the same problem.
A useful clue is whether the issue affects one browser, one device, or the entire network. A single-browser issue points toward browser settings or extensions. A single-device issue may involve that device’s network configuration. If several devices fail on the same Wi-Fi network, the router, DNS provider, or internet connection may be involved.
Do not share passwords or install unknown “DNS cleaner” software to solve the problem. Most devices already include the tools needed to refresh DNS, and third-party utilities can introduce unnecessary privacy or security risks.
Conclusion: How Do I Clear DNS?
To clear DNS, refresh the cache where the problem is occurring. On Windows, run ipconfig /flushdns. On macOS, use the appropriate Terminal command for your version. Linux users should identify their active resolver, while browser and mobile users can try the available browser controls, toggle Airplane Mode, or restart the device. If the issue affects every device on your network, restart the router carefully.
After clearing DNS, reopen the browser and test the site again. If nothing changes, the cause may be an outage, a broader network problem, or a setting unrelated to DNS. Start with the least disruptive steps, avoid changing unfamiliar settings, and contact your network administrator or internet provider when the problem persists.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.