What Is DNS? Understanding the Domain Name System
Understand how the Domain Name System turns human-friendly names into IP addresses and how it impacts everyday browsing.
DNS Overview and Why It Matters
The Domain Name System (DNS) is like the phone book of the internet. When you type a website name into your browser, DNS looks up the corresponding IP address so your device knows where to send the request. Without DNS, you would need to memorize long numeric addresses for every site you visit.
DNS is distributed and hierarchical, with root servers at the top, followed by top-level domain servers, authoritative name servers for each domain, and caching resolvers that sit close to users. This layered system keeps lookups fast and resilient.
DNS Troubleshooting Commands
When websites refuse to load, DNS is often to blame. Command-line tools give you a clearer picture than a browser error page. You can check whether a name resolves at all, compare answers from different resolvers, or flush local caches when records change.
Using a mix of nslookup, dig, and ping, you can quickly see whether the problem lies with your local device, your router, or an upstream DNS provider.
Use these commands while troubleshooting name resolution.
nslookup example.com # Query current DNS server
ipconfig /displaydns # Show DNS client cache
ipconfig /flushdns # Clear DNS cache
Run these in Terminal when debugging DNS.
dig example.com # Detailed DNS query
scutil --dns # Show DNS configuration
sudo dscacheutil -flushcache # Clear DNS cache