Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

How to clear DNS cache on Windows, Mac, Linux, Chrome and Android

A site moved to a new server, but your browser still shows the old one, or an error that should be gone. This guide gives the exact command to flush DNS on every common system, and explains when flushing will not help.

Short answer: To clear DNS cache on Windows, run ipconfig /flushdns in Command Prompt. On a Mac run sudo killall -HUP mDNSResponder, on Ubuntu run sudo resolvectl flush-caches, and in Chrome open chrome://net-internals/#dns and click Clear host cache. On phones, toggle Airplane mode. Flushing only clears your own device: your ISP's resolver keeps its copy until the record's TTL expires.

How to clear DNS cache, in one table

Each operating system and browser keeps its own DNS cache, so the command depends on where the stale answer sits. On Windows it is ipconfig /flushdns; macOS, Linux, the main browsers and phones each have their own command or page, listed below. Each one empties a single cache on your own device, so you may need two of them: one for the operating system and one for the browser.

WhereCommand or settingAdmin rights
Windows 10 and 11ipconfig /flushdns or Clear-DnsClientCacheipconfig /flushdns: usually no. Clear-DnsClientCache: yes (run PowerShell as administrator)
macOSsudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderYes (sudo)
Linux with systemd-resolvedsudo resolvectl flush-cachesYes
Linux with nscdsudo nscd -i hostsYes
Linux with dnsmasqsudo killall -HUP dnsmasqYes
Chrome, Edge, Bravechrome://net-internals/#dns (Edge: edge://net-internals/#dns)No
Firefoxabout:networking#dns, then Clear DNS CacheNo
Android and iPhoneAirplane mode on and off, or restartNo

When flushing DNS helps, and when it does not

Every DNS answer comes with a TTL (time to live), a number of seconds for which it may be cached. Your browser, your operating system, your Wi-Fi router and your ISP's resolver can each hold a copy until that TTL runs out. Flushing removes the copies held on your own device and nothing else.

Flushing helps when:

  • A site's IP address changed and the record has already updated at the resolver you use, but your device still has the old answer.
  • You saw an error such as DNS_PROBE_FINISHED_NXDOMAIN while a domain was being set up. "Name does not exist" answers are cached too (negative caching), so the error can stay after the record is fixed.
  • You edited your hosts file, or switched VPN or DNS provider, and a few names still go to the old place.

Flushing does not help when:

  • The ISP resolver (Jio, Airtel, BSNL or any other) still holds the old record. Your flush does not touch its cache, and it will keep serving the old answer until the TTL expires there.
  • The record itself is wrong. Flushing only makes you fetch the wrong answer again faster.
  • The problem is not DNS at all: the server is down, a firewall blocks you, or the SSL certificate is invalid. Our guide to "This site can't be reached" helps you tell these apart.

Flushing also does not shorten a TTL. If a record was published with a TTL of 86,400 seconds (one day), resolvers that cached it may keep it for up to a day, whatever you do on your laptop. People call this waiting "DNS propagation". It is really caches expiring one by one.

Windows 10 and 11: ipconfig /flushdns

Windows keeps its DNS answers in the DNS Client service's resolver cache. Microsoft's ipconfig reference describes /flushdns as flushing and resetting that cache, including negative ("name not found") entries.

  1. Press the Windows key, type cmd, and open Command Prompt. Windows Terminal or PowerShell work too.
  2. Run:
    ipconfig /flushdns
  3. You should see "Successfully flushed the DNS Resolver Cache."

On many Windows 10 and 11 machines this works from a normal window. If you get "The requested operation requires elevation" instead, right-click Command Prompt, choose Run as administrator, and run the command again. Work laptops with locked-down policies are the usual case.

In PowerShell, the equivalent cmdlet is:

Clear-DnsClientCache

Microsoft's documentation states that it is equivalent to running ipconfig /flushdns. Unlike ipconfig, it needs elevation: run it from PowerShell opened with Run as administrator, or you get "Access is denied". To see what is cached before or after a flush, use either of these:

ipconfig /displaydns
Get-DnsClientCache

The list includes entries loaded from your hosts file (C:\Windows\System32\drivers\etc\hosts). They come back after a flush, because Windows reloads the file. To stop a hosts entry from working, delete the line from the file.

macOS: dscacheutil and killall -HUP mDNSResponder

On a Mac, DNS caching is handled by the mDNSResponder process. Apple's (now archived) support article on resetting the DNS cache gives sudo killall -HUP mDNSResponder for OS X Yosemite 10.10.4 and later; the same command still works on current macOS. Many admins also clear the directory services cache in the same line:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Open Terminal (Applications, then Utilities), paste the line, and enter your Mac login password when asked. Nothing is printed when it succeeds. The -HUP signal tells mDNSResponder to drop its cache. It does not quit the process, so your network connection stays up.

The sudo discoveryutil mdnsflushcache command that some old posts mention only applied to OS X 10.10 to 10.10.3 and does not exist on current macOS.

Linux: resolvectl flush-caches, nscd and dnsmasq

Linux has no single DNS cache. Which command you need depends on what is running. Many minimal servers have no local cache at all, and each lookup goes straight to the resolver in /etc/resolv.conf.

systemd-resolved (Ubuntu, Fedora, many desktops)

If /etc/resolv.conf points to 127.0.0.53, you are using systemd-resolved. Flush it with:

sudo resolvectl flush-caches

Older tutorials write systemd-resolve --flush-caches. That was the tool's name until systemd 239 (2018) renamed it to resolvectl. systemd keeps the old name for compatibility, but some distributions no longer install it, so use resolvectl. To confirm the flush worked, look at the cache size:

resolvectl statistics

"Current Cache Size" should drop to 0 or close to it. resolvectl query example.com then resolves the name again through the same service.

nscd

Some older or enterprise systems run the name service cache daemon. Its manual gives nscd -i followed by a database name to invalidate that cache:

sudo nscd -i hosts

dnsmasq

dnsmasq is common on routers, Raspberry Pi setups and some desktops. Its manual says it clears its cache when it receives a SIGHUP:

sudo killall -HUP dnsmasq

A SIGHUP also reloads /etc/hosts, but not dnsmasq's main configuration file. Restart the service if you changed that file.

Browsers: Chrome, Edge and Firefox

Browsers keep their own short-lived DNS cache, separate from the operating system's. If you use secure DNS (DNS over HTTPS) inside the browser, the browser does not use the system resolver at all. That is why a site can work in Firefox and fail in Chrome on the same laptop.

Chrome, Edge and Brave

  1. Type chrome://net-internals/#dns in the address bar and press Enter. In Edge use edge://net-internals/#dns, and in Brave brave://net-internals/#dns.
  2. Click Clear host cache.
  3. Go to chrome://net-internals/#sockets and click Flush socket pools. Open connections can keep talking to the old IP address even after the cache is empty.
  4. Reload the site. If it still loads the old version, close and reopen the browser.

The same page works in Chrome on Android, which is the closest thing to a DNS flush button on a phone.

Firefox

Open about:networking#dns and click Clear DNS Cache. The same page lists the names Firefox has cached and the addresses it holds for them.

Phones and routers: Android, iPhone and the Wi-Fi router

Android and iOS have no command to flush DNS. These steps clear the cache in practice:

  • Android: turn Airplane mode on, wait a few seconds, and turn it off. A restart does the same. In Chrome on Android you can also use chrome://net-internals/#dns as above.
  • Android Private DNS: under Settings, Network & internet, Private DNS (the path varies by brand), you can set a provider hostname such as dns.google or one.one.one.one. Your phone then stops using the mobile network's resolver. This helps when the operator's resolver is the one holding a stale record. Switch back to Automatic when you are done if you prefer the default.
  • iPhone and iPad: toggle Airplane mode, or restart the device.
  • Wi-Fi router: many home routers run a DNS cache for every device on the network. Restarting the router clears it. If every device in the house gets the same old answer and your mobile data gets the new one, the router or the broadband ISP's resolver is holding it.

Check that the new record has reached you

Before and after flushing, compare what your normal resolver says with what public resolvers say. On Windows, macOS and Linux:

nslookup example.com
nslookup example.com 8.8.8.8
nslookup example.com 1.1.1.1

The first line asks your default resolver (usually your router or ISP). The other two ask Google Public DNS and Cloudflare directly. On Linux and macOS, dig gives shorter output and shows the remaining TTL in the second column:

dig example.com A +noall +answer
dig @1.1.1.1 example.com A +noall +answer

How to read the result:

  • Public resolvers show the new IP, your default shows the old one: your router or ISP resolver is still caching it. Wait for the TTL, restart the router, or change your DNS settings. Our list of the best DNS servers in India covers the options.
  • All resolvers show the new IP, the browser shows the old site: flush the operating system and browser caches as above, then check your hosts file.
  • No resolver shows the new IP: the record has not been changed, or it was changed at the wrong DNS provider. Check which nameservers the domain uses. Flushing on your side will not help.

Google Public DNS (8.8.8.8) and Cloudflare (1.1.1.1) both offer public pages for purging a name from their resolver caches (see the sources below). Google's flush tool asks you to solve a reCAPTCHA and cannot flush domains that use EDNS Client Subnet, and its FAQ notes that cached TTLs are generally limited to six hours. Purging there helps you and everyone else using those resolvers. It has no effect on Jio, Airtel or any other ISP's resolver.

After moving to a new host or VPS

A host move is when DNS caching causes the most confusion. Some visitors reach the new server, others the old one, and the order depends on whose cache expires first. A few habits keep this short:

  1. Lower the TTL in advance. A day before the move, set the TTL of the A record to 300 seconds (5 minutes). Caches that pick up the record after that will expire it quickly.
  2. Test the new server before switching. Add a line such as 203.0.113.10 example.com www.example.com to your hosts file, using the new server's IP. Only your computer goes to the new server. Remove the line when you are done.
  3. Change the A record (and AAAA, if you use IPv6) at your DNS provider. Our guide to pointing a domain to a VPS shows the records.
  4. Keep the old server running for at least the length of the old TTL, so visitors with a cached answer still see a working site.
  5. Flush your own caches and check with nslookup against 8.8.8.8 and 1.1.1.1.
  6. Raise the TTL again once everything points to the new server.

Changing nameservers, rather than a single record, is slower. Delegation is cached under the NS TTL at the registry, which you cannot change, and on many resolvers also under the NS TTL in your old DNS zone. Lower that one too, and keep the old DNS provider serving the zone until both have expired. The full checklist is in our guide to migrating a website to a new host.

DNS and your Bigdomainhost server

Bigdomainhost does not register domains. Your DNS stays with your registrar or DNS provider, and you point an A record at your server's IP. Each KVM VPS in Mumbai or Delhi NCR comes with a dedicated IPv4 address, an IPv6 /64 and reverse DNS you can set yourself. If a site still does not open after a move, message us on WhatsApp at +91 75994 50220 at any time, or call during IST working hours.

This guide was written by the Bigdomainhost team with AI assistance; facts and commands were checked against the linked sources on 23 November 2026.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What does ipconfig /flushdns do?

It empties the Windows DNS resolver cache, the list of recent name lookups kept by the DNS Client service, including cached 'name not found' answers. The next time you open a site, Windows asks your DNS server again. Entries from your hosts file are reloaded straight away.

Do I need to run ipconfig /flushdns as administrator?

Usually not: on most Windows 10 and 11 machines it works from a normal Command Prompt. If you see 'The requested operation requires elevation', right-click Command Prompt, choose Run as administrator and run it again. The PowerShell equivalent, Clear-DnsClientCache, does need PowerShell opened with Run as administrator, or it fails with 'Access is denied'.

How do I flush DNS on a Mac?

Open Terminal and run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder, then enter your login password. Apple's now-archived article lists sudo killall -HUP mDNSResponder for OS X Yosemite 10.10.4 and later, and the same command still works on current macOS. Nothing is printed when it works.

How do I flush DNS on Ubuntu?

Run sudo resolvectl flush-caches. Ubuntu uses systemd-resolved, and resolvectl statistics shows the cache size so you can confirm it dropped. The older systemd-resolve --flush-caches form was the tool's name before systemd 239, and some distributions no longer install it.

How do I clear DNS cache on Android?

Android has no flush command. Turn Airplane mode on and off, or restart the phone. In Chrome on Android you can also open chrome://net-internals/#dns and tap Clear host cache. Setting a Private DNS provider makes the phone stop using the mobile operator's resolver.

Why does the old website still show after I flushed DNS?

Your flush only clears your own device. Your router or ISP resolver may still hold the old record until its TTL expires, and the browser may have its own cache or open connections. Compare nslookup example.com with nslookup example.com 8.8.8.8 to see which cache is stale.

Does flushing DNS speed up DNS propagation?

No. Propagation is caches around the internet expiring one by one, according to the TTL on the record. Flushing makes your own device ask again, but it cannot shorten the TTL anywhere else. Lowering the TTL a day before a change is what makes a switch fast.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.