Check Which DNS Servers Your Mac Uses
Read the configured DNS servers for Wi-Fi or Ethernet with networksetup -getdnsservers.
Run `networksetup -getdnsservers "Wi-Fi"` — it prints the DNS servers, or 'There aren't any DNS Servers set' meaning the router's values are used.
01Command
Command
$ networksetup -getdnsservers "Wi-Fi"02What it does
This shows the manual DNS override for the service; if none is set, macOS uses whatever the router handed out via DHCP (visible with `scutil --dns`). Slow or failing page loads often trace back to a bad resolver, so confirming the actual DNS list is step one. Note this reads the setting, not the live resolver — `scutil --dns` shows what is in effect right now.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- networksetup — configure network settings (macOS man page)Evidence: Documents `networksetup -getdnsservers <networkservice>` which lists manually configured DNS servers or reports that DNS is set by DHCP.
Last verified: 2026-09-18 · Category: Network