Get a free website with any plan

See how
DOMAINS

Flushing your DNS cache on Windows, macOS and Linux

Last updated

IN SHORT

Flushing your local DNS cache forces your computer to perform a fresh lookup when a website still loads an old server after DNS updates. For Flashcloud domains, this troubleshooting step only clears what your personal operating system remembers. It will not alter your hosting records or speed up DNS propagation across the rest of the internet.

If a site still loads the old server after you've updated its DNS records, your computer is probably serving a stale answer from its local cache instead of asking again. Clearing that cache forces a fresh lookup. The command is different on every OS: ipconfig /flushdns on Windows, sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS, and a service restart on Linux.

This is purely local troubleshooting. It doesn't change anything about your domain or your hosting. It only clears what your own machine remembers. If you're chasing a propagation issue after pointing a domain at new nameservers or editing a record, see DNS record types explained for what each record actually controls, and remember that other resolvers around the world cache independently of your machine, so flushing your own cache won't speed up the internet's view of the change.

Windows

Open Command Prompt as Administrator (right-click Start, choose Terminal (Admin) or Command Prompt (Admin)), then run:

ipconfig /flushdns

You should see a confirmation that the resolver cache was successfully flushed. If you want to confirm the cache is actually empty, run ipconfig /displaydns before and after to compare.

macOS

Open Terminal and run both commands together:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

The first command clears the Directory Service cache, the second restarts the process that actually answers DNS queries on macOS (mDNSResponder), which is necessary on modern macOS versions for the flush to take effect. You'll be prompted for your account password since both commands need sudo.

Linux

The command depends on what's managing DNS on your distro. Most modern distros running systemd-resolved use:

sudo systemd-resolve --flush-caches

or on newer systemd versions:

sudo resolvectl flush-caches

If your system runs nscd instead, restart it:

sudo systemctl restart nscd

Not sure which one you're running? systemctl status systemd-resolved will tell you if it's active. If neither service exists, your distro likely isn't caching DNS locally at all, and there's nothing to flush.

Don't forget the browser's own cache

Browsers keep a separate DNS cache on top of the OS level one, so flushing the system cache doesn't always fix what you're seeing in a browser tab. For Chrome and Chromium-based browsers, go to chrome://net-internals/#dns and click Clear host cache. Firefox caches DNS for a shorter window by default and usually resolves itself within a minute or two, but a full browser restart clears it immediately. When in doubt, test in a private/incognito window first. It skips your browser's cache and shows whether the problem is DNS or something else.

When flushing doesn't fix it

If the site still resolves to the old location after flushing your local cache and trying a different network (like your phone on cellular data), the problem usually isn't on your end. It's either that the DNS change hasn't finished propagating to resolvers worldwide yet, or the record itself is wrong. Double check the actual record values in Services → your hosting → DNS Zone Editor, and note that changing nameservers at your registrar is a separate step from editing records, see changing nameservers at GoDaddy, Namecheap, and Cloudflare if you're not sure which one you touched.

If you've confirmed the record is correct, given it time, and it's still not resolving where it should, open a ticket from Support → New ticket in the portal. A real person can check what our nameservers are actually serving and rule out a misconfiguration on our end.

Common questions

Will flushing my DNS cache make my changes show up faster for everyone?

No. Flushing only clears what your personal machine remembers. Other resolvers around the world cache independently, so local flushing cannot speed up global propagation.

Why is Chrome still loading my old site after a flush?

Chrome keeps its own internal DNS cache on top of your operating system. Go to chrome://net-internals/#dns and click Clear host cache, or test the site in an incognito window.

How do I check if Linux is caching my DNS?

Run systemctl status systemd-resolved in your terminal to see if the service is active. If neither systemd-resolved nor nscd exists on your machine, your distribution is not caching DNS locally.

What if my site still points to the old server after flushing?

Your records may still be propagating, or the values are incorrect. Verify your records in DNS Zone Editor, test on cellular data, or open a support ticket so Flashcloud staff can check our nameservers.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.