DNS Lookup: How It Works and Why It Matters
Every time you visit a website, your device performs a DNS lookup — translating a domain name like miip.link into an IP address like 104.21.50.120. Without DNS, you'd need to memorize IP addresses for every website. This guide explains how DNS lookups work, the different record types, and how to troubleshoot DNS issues.
What is DNS?
DNS (Domain Name System) is often called "the phonebook of the Internet." It's a hierarchical, distributed database that maps domain names to IP addresses. When you type miip.link in your browser, DNS resolves it to the server's IP address so your browser can connect.
The system works in layers: your device asks a recursive resolver, which asks root servers, which point to TLD servers, which point to authoritative servers. Each step narrows down the answer until you get the exact IP address.
How a DNS Lookup Works Step by Step
- You type
miip.linkin your browser - Your device checks its local cache (browser and OS)
- If not cached, it queries your configured DNS resolver (usually your ISP's)
- The resolver queries a root server: "Who handles .link?"
- Root server responds: "The .link TLD servers are ns1.nic.link, ns2.nic.link"
- The resolver queries the .link TLD server: "Who handles miip.link?"
- TLD server responds: "The authoritative servers are ns1.cloudflare.com, ns2.cloudflare.com"
- The resolver queries Cloudflare: "What is the IP of miip.link?"
- Cloudflare responds: "104.21.50.120"
- The resolver caches the answer and returns it to your browser
This entire process takes milliseconds. You can test it yourself using the DNS lookup tool on miip.link.
DNS Record Types
| Type | Purpose | Example |
|---|---|---|
| A | Maps domain to IPv4 | miip.link → 104.21.50.120 |
| AAAA | Maps domain to IPv6 | miip.link → 2606:4700:3031::ac43:8a4a |
| CNAME | Alias to another domain | www.miip.link → miip.link |
| MX | Mail server | miip.link → mail.miip.link (priority 10) |
| TXT | Text records (SPF, DKIM) | v=spf1 include:_spf.google.com ~all |
| NS | Name servers | miip.link → ns1.cloudflare.com |
| SOA | Start of authority | Primary NS, admin email, serial |
| SRV | Service records | _sip._tcp.miip.link → server:port |
| PTR | Reverse DNS (IP → domain) | 120.50.21.104 → miip.link |
| CAA | Certificate authority authorization | Which CAs can issue certificates |
How to Perform a DNS Lookup
Using miip.link (easiest)
Visit miip.link and use the DNS Lookup tool. Enter any domain and select the record type (A, AAAA, MX, etc.) to see the results instantly.
Using command line
# Basic lookup nslookup miip.link # Specific record type nslookup -type=MX miip.link # Using dig (more detailed) dig miip.link A dig miip.link MX dig miip.link ANY # Using host (simple output) host miip.link host -t MX miip.link
Using PowerShell (Windows)
Resolve-DnsName miip.link Resolve-DnsName miip.link -Type MX
DNS Caching
DNS responses are cached at multiple levels to speed up future lookups:
- Browser cache: Chrome, Firefox, Safari cache DNS for a few minutes
- OS cache: Your operating system caches DNS responses
- Router cache: Your home router caches DNS for all devices
- ISP resolver cache: Your ISP's DNS servers cache popular domains
Each record has a TTL (Time To Live) that determines how long it can be cached. Typical TTLs range from 300 seconds (5 minutes) to 86400 seconds (24 hours).
Clearing DNS cache
# Windows ipconfig /flushdns # macOS sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder # Linux sudo systemd-resolve --flush-caches
Common DNS Problems
- Site not loading: DNS server is down or unreachable. Try changing to a public DNS like 1.1.1.1
- DNS propagation delay: After changing DNS records, it can take up to 48 hours for all resolvers to update (usually 1-4 hours)
- DNS hijacking: Malware or rogue DNS servers redirecting you to fake sites
- DNS leak: Your DNS queries bypass your VPN, revealing your browsing to your ISP
FAQ
How long does DNS propagation take?
Typically 1-4 hours, but up to 48 hours in worst cases. Lower TTL values mean faster propagation.
Can I use multiple DNS servers?
Yes, and it's recommended. Configure your primary DNS as 1.1.1.1 (Cloudflare) and secondary as 8.8.8.8 (Google) for redundancy.
What's the difference between A and CNAME records?
An A record points directly to an IP address. A CNAME points to another domain name. Use A for root domains and CNAME for subdomains.
Try the DNS Lookup tool on miip.link — check any domain's DNS records instantly.