DNS (Domain Name System) is the lookup that turns a name you type, such as example.com, into the number address (an IP address) your computer connects to. Every time you open a website or an app contacts a server, a DNS lookup happens first.
Your Mac asks a DNS server to do the lookup. By default that’s the one your router or Wi-Fi network gives you, usually run by your internet provider. You can choose another, such as one from Cloudflare, Google or Quad9.
Why DNS matters for security
Whoever runs your DNS server sees which names you look up, and can answer with the wrong address. Malware called a DNS changer swaps your server for one the attacker controls, so it can send you to fake sites. A DNS server can also block names known to host malware.
Ordinary lookups aren’t encrypted, so anyone on the same network can read them. Encrypted DNS fixes that.
How to see your DNS servers on a Mac
In System Settings, open Wi-Fi, click Details next to your network, then choose DNS. Or run this in Terminal. It lists the servers for Wi-Fi and changes nothing:
networksetup -getdnsservers Wi-FiIf it says there aren’t any, your Mac uses the ones the network provides. The mDNSResponder process handles lookups on a Mac.
On Windows
DNS works the same way on Windows, with the server set in the network adapter’s settings.