> ## Documentation Index
> Fetch the complete documentation index at: https://help.noxity.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Clear your DNS cache

> Flush the DNS resolver cache on macOS, Windows, Linux, and ChromeOS so your machine looks up fresh records after a DNS change.

When you change a DNS record (move a site, switch nameservers, swap an MX), your computer keeps serving the old answer until its local cache expires. Flushing the cache forces a fresh lookup against your resolver. Useful right after you've made a change and don't want to wait the TTL out, or when a site loads the wrong server even though `dig` from a public resolver returns the correct record.

## Before you begin

* DNS caches at multiple layers: your browser, your OS, your router, your ISP, and any intermediate resolvers in between. Flushing your OS cache only clears the layer on your machine.
* If the upstream resolver still hands you the old record, the only fix is time (wait the previous TTL) or switching your machine to a public resolver like `1.1.1.1` or `8.8.8.8`.
* Browser-internal DNS caches are separate from the OS cache. After flushing the OS, also clear the browser's cache, covered further down.

## Flush the OS cache

<Tabs>
  <Tab title="macOS">
    Open the Terminal (Spotlight, then "Terminal") and run:

    ```bash theme={}
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
    ```

    Enter your admin password when prompted. There's no success message; the command returns silently when it works.

    <Note>
      macOS 10.6 and earlier only need `sudo dscacheutil -flushcache`. The `mDNSResponder` half is what 10.7 and up actually use; running both is harmless and works across every version Apple still ships.
    </Note>
  </Tab>

  <Tab title="Windows">
    <Steps>
      <Step title="Open Command Prompt as Administrator">
        Press `Win` + `S`, type `cmd`, right-click **Command Prompt**, and pick **Run as administrator**.
      </Step>

      <Step title="Flush the resolver">
        Run:

        ```bat theme={}
        ipconfig /flushdns
        ```

        You should see *Successfully flushed the DNS Resolver Cache*.
      </Step>
    </Steps>

    <Tip>
      Same job in PowerShell: `Clear-DnsClientCache`. No separate elevation prompt if the PowerShell window is already running as administrator.
    </Tip>
  </Tab>

  <Tab title="Linux">
    Linux DNS caching depends on what's running on the box. Pick the one that matches your setup:

    | Service running      | Command                          |
    | -------------------- | -------------------------------- |
    | `systemd-resolved`   | `sudo resolvectl flush-caches`   |
    | `nscd`               | `sudo systemctl restart nscd`    |
    | `dnsmasq`            | `sudo systemctl restart dnsmasq` |
    | BIND running locally | `sudo rndc flush`                |

    Not sure which is in play? Run `resolvectl status` first; if the command exists, you're on `systemd-resolved`. Otherwise try `systemctl status nscd` and `systemctl status dnsmasq` to see which one's loaded.

    <Note>
      Most desktop Linux installs from the last few years use `systemd-resolved` (Ubuntu 18.04+, modern Debian, Fedora, openSUSE). Server distros sometimes ship with no local DNS cache at all, in which case there's nothing to flush and you can stop here.
    </Note>
  </Tab>

  <Tab title="ChromeOS">
    <Steps>
      <Step title="Open Chrome's net-internals">
        In a new tab, navigate to `chrome://net-internals/#dns`.
      </Step>

      <Step title="Clear the host cache">
        Click **Clear host cache**. The button doesn't show feedback; the cache is flushed immediately.
      </Step>

      <Step title="Flush the socket pools">
        Switch to `chrome://net-internals/#sockets` and click **Flush socket pools**. This drops any open keep-alive connections that might still resolve to the old IP.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Clear the browser DNS cache

Browsers cache resolved hostnames separately from the OS. Even after flushing the OS cache, the browser keeps using its own copy until you clear it or restart the app.

<Tabs>
  <Tab title="Chrome / Edge / Brave">
    Navigate to `chrome://net-internals/#dns` and click **Clear host cache**, then go to `chrome://net-internals/#sockets` and click **Flush socket pools**. Same flow on Edge (`edge://net-internals/#dns`) and Brave (`brave://net-internals/#dns`).
  </Tab>

  <Tab title="Firefox">
    Navigate to `about:networking#dns` and click **Clear DNS Cache**. The list under **DNS** clears, and Firefox starts resolving fresh.
  </Tab>

  <Tab title="Safari">
    Safari piggy-backs on the macOS DNS cache. Flush macOS using the steps above, then quit Safari (`Cmd` + `Q`, not just close the window) and reopen.
  </Tab>
</Tabs>

## Verify the flush worked

Resolve the hostname you just updated and confirm the new IP comes back. From any shell:

```bash theme={}
nslookup yourdomain.com
```

For a tighter check against multiple resolvers:

```bash theme={}
dig @1.1.1.1 yourdomain.com +short
dig @8.8.8.8 yourdomain.com +short
```

If those return the new value but your browser still hits the old server, the browser cache is still stale. Re-flush with the steps above and load the site in incognito or private mode for a clean check.

For an in-cPanel diagnostic that runs the lookup from the server itself, see [Track DNS](/web-hosting/cpanel/advanced/track-dns).

## Common issues

<AccordionGroup>
  <Accordion title="Site still loads the old version after flushing">
    Three more layers above the OS: the browser cache (clear it, or use incognito), an intermediate proxy or VPN (disable temporarily and retry), and your router (restart as a last resort). If `dig` resolves to the new IP correctly but the page renders the old content, it's likely the site's own CDN or page cache, not DNS at all. Purge the CDN and any WordPress, LiteSpeed, or Cloudflare cache layers.
  </Accordion>

  <Accordion title="`ipconfig /flushdns` says access is denied">
    The Command Prompt isn't elevated. Close it, right-click **Command Prompt**, pick **Run as administrator**, and retry.
  </Accordion>

  <Accordion title="`resolvectl` says command not found">
    Your distro doesn't run `systemd-resolved`. Try `sudo systemctl restart nscd` or `sudo systemctl restart dnsmasq` instead. If neither service is installed, your OS isn't caching DNS locally and there's nothing to flush.
  </Accordion>

  <Accordion title="Records still resolve to the old IP from multiple public resolvers">
    The change hasn't propagated yet. Public resolvers honour the previous record's TTL, so if the old TTL was 24 hours, downstream caches can hold the old answer for up to 24 hours. Lower the TTL on records *before* the next change so future swaps are faster.
  </Accordion>

  <Accordion title="cPanel changes look right locally but not externally">
    The cPanel server's own DNS sometimes lags external resolvers. [Track DNS](/web-hosting/cpanel/advanced/track-dns) runs the lookup from inside the server so you can see what cPanel itself sees. The [Zone Editor](/web-hosting/cpanel/domain-management/zone-editor) is where the records live if you need to confirm what's actually published.
  </Accordion>
</AccordionGroup>

## Need a hand?

<CardGroup cols={2}>
  <Card title="Open a ticket" icon="life-ring" href="https://members.noxity.io/submitticket.php">
    Best for anything that needs an account check or a config change on our end.
  </Card>

  <Card title="Live chat" icon="messages" href="https://noxity.io/contact">
    Faster for quick questions during business hours.
  </Card>
</CardGroup>

<div className="mt-8">
  <Accordion title="Sources" icon="book-bookmark">
    * [Track DNS (cPanel)](/web-hosting/cpanel/advanced/track-dns)
    * [Zone Editor](/web-hosting/cpanel/domain-management/zone-editor)
    * [Networking tools](/tools/networking-tools)
    * [Reset the DNS cache on Mac (Apple) ↗](https://support.apple.com/guide/mac-help/mh27606/mac)
    * [Microsoft `ipconfig` reference ↗](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig)
    * [`resolvectl(1)` man page ↗](https://www.freedesktop.org/software/systemd/man/latest/resolvectl.html)
    * [How to Clear Your DNS Cache (cPanel) ↗](https://docs.cpanel.net/knowledge-base/dns/how-to-clear-your-dns-cache/)

    <div className="mt-4 pt-4 border-t border-gray-200 dark:border-gray-800 text-xs text-gray-500 dark:text-gray-400 italic leading-relaxed">
      These guides were ported from our legacy knowledgebase by AI, then reviewed and extensively tested by humans before publication to ensure the migration went through smoothly.
    </div>
  </Accordion>
</div>
