flushdns
Flushdns refers to clearing the DNS resolver cache on a computer or device. DNS caching stores recent hostname-to-IP mappings to speed up repeated lookups. Flushing the cache discards stored entries and forces the system to fetch fresh information from configured DNS servers.
Reasons to flush DNS cache include resolving websites that load an old or incorrect IP address, applying
Platform-specific methods vary:
- Windows: open an elevated Command Prompt and run ipconfig /flushdns. A message confirming that the DNS
- macOS: commands depend on the version. A common approach is sudo killall -HUP mDNSResponder. Some versions
- Linux: methods depend on the DNS resolver in use. For systems with systemd-resolved, sudo systemd-resolve --flush-caches
- Android and iOS: there is no universal one-step flush. Common practices include toggling Airplane mode on
Note that browser caches are separate from the OS DNS cache; flushing DNS cache affects system-wide hostname