---
title: Flush your DNS cache
description: Your site moved or its DNS changed, but your computer still loads the old version? Clear the DNS cache your device has saved locally.
sidebar:
  order: 2
---

import { Steps, Aside } from '@astrojs/starlight/components';
import Support from '~/content/partials/support-link.mdx';

When you visit a site, your computer saves ("caches") the answer to *which server is this domain on?* so it doesn't have to ask again every time. That's normally invisible and helpful — but right after a domain moves to a new server or its DNS records change, your device can keep using the old answer and show you the old site.

Devices are supposed to re-check after a short while, but some record lifetimes stretch to hours or even days. Clearing the cache by hand skips the wait.

## First, confirm it's actually your computer

Before changing anything locally, check whether the new DNS has actually gone out to the world. Look your domain up at [whatsmydns.net](https://www.whatsmydns.net/) — it queries servers in many countries at once.

- **Most locations show the new value** — the change has propagated, and a stale local cache is the likely culprit. Continue below.
- **Most locations still show the old value** — the change hasn't propagated yet. Flushing your own cache won't help; give it time.

<Aside type="tip">
  A quick sanity check: open the site in a **private / incognito window**, or on your phone using mobile data instead of Wi-Fi. If it looks correct there, the problem is local to your computer.
</Aside>

## Windows

<Steps>

1. Press the **Windows key**, type `Command Prompt`, and open it.

2. Type this and press **Enter**:

   ```text
   ipconfig /flushdns
   ```

3. You should see *"Successfully flushed the DNS Resolver Cache."*

</Steps>

## macOS

<Steps>

1. Open **Terminal** (in **Applications → Utilities**, or press `Cmd` + `Space` and search for "Terminal").

2. Type this and press **Enter**:

   ```bash
   sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
   ```

3. Enter your administrator password when prompted, then press **Enter**. Nothing is printed when it works — no news is good news.

</Steps>

<Aside type="note">
  Both commands matter on macOS: the first clears the lookup cache, the second restarts the service that answers DNS queries. Running only the first often appears to do nothing.
</Aside>

## Still seeing the old site?

Your computer isn't the only thing that caches DNS. Work outward:

- **Your browser** keeps its own cache. Do a hard refresh (`Ctrl` + `Shift` + `R`, or `Cmd` + `Shift` + `R` on a Mac) or try a private window.
- **Your router** caches DNS too. Restarting it clears that.
- **Your internet provider's resolvers** cache as well, and you can't clear those — they expire on their own schedule. If everything else is clean, this is usually what's left. It typically resolves within a few hours.

If it's still wrong well after the record's lifetime should have expired, it may not be a caching problem at all — get in touch and we'll look at the actual DNS records.

## Related

- [Manage DNS records](/whp/how-to/manage-dns-records/)
- [Add a domain](/whp/how-to/add-a-domain/)
- [Clear your site's cache](/whp/how-to/clear-your-cache/) — for when *content* is stale rather than DNS.

## Still stuck?

<Support />
