---
name: dns-flush
description: Diagnoses and fixes DNS resolution failures when websites won't load but IP-level connectivity is working.
compatibility: Requires Node.js 18+, Windows or macOS
allowed-tools:
- check_connectivity
- check_vpn_status
- flush_dns_cache
metadata:
prerequisites:
before-corrective:
- check_connectivity
- check_vpn_status
maxAggregateRisk: medium
userLabel: "DNS resolution failure"
examples:
- "websites won't load but my internet is on"
- "I'm getting DNS_PROBE errors"
- "names don't resolve but ping works"
- "Chrome says server not found"
- "DNS isn't working"
pill:
label: Fix DNS
goal: Websites won't load, please diagnose and fix the DNS issue
icon: Globe
iconClass: text-blue-500
order: 12
---
## When to use
Websites won't load but IP-level connectivity is intact (the user can ping IPs but not hostnames). Do NOT use for full connectivity outages — use `network-reset` instead.
## Steps
**Step 1 — Confirm DNS is the problem**
Call `check_connectivity` with `targets: ["8.8.8.8", "1.1.1.1", "google.com", "example.com"]` and `count: 3`.
Note: if numeric IPs are reachable but hostnames aren't, the issue is DNS. If nothing is reachable, this skill is the wrong tool — switch to `network-reset`.
**Step 2 — Rule out VPN-routed DNS** (MUST include)
Call `check_vpn_status`. A connected VPN routes DNS through its tunnel and can produce DNS-failure symptoms. If a VPN is connected, advise disconnecting and retesting before proceeding.
**Step 3 — Flush the DNS cache**
Call `flush_dns_cache`. Consider this before any heavier fix (like network reset) because flushing is non-destructive and instantly reversible.
Only run when Step 1 showed numeric IPs reachable AND hostnames unreachable, AND Step 2 showed no active VPN.
**Step 4 — Verify the fix**
Call `check_connectivity` with the same hostname targets as Step 1. Only run after Step 3. Success means DNS is working; remaining failures mean the upstream DNS server (router or ISP) is at fault.
## Edge cases
- **VPN active** — Step 2 catches this; advise disconnect-and-retest.
- **Hardcoded DNS server** — if the user set a manual DNS server that's now broken, flushing won't help. Suggest reverting to automatic DNS.
- **macOS mDNSResponder hung** — the flush briefly drops all DNS for 1–2 seconds. Normal.