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

  1. You type miip.link in your browser
  2. Your device checks its local cache (browser and OS)
  3. If not cached, it queries your configured DNS resolver (usually your ISP's)
  4. The resolver queries a root server: "Who handles .link?"
  5. Root server responds: "The .link TLD servers are ns1.nic.link, ns2.nic.link"
  6. The resolver queries the .link TLD server: "Who handles miip.link?"
  7. TLD server responds: "The authoritative servers are ns1.cloudflare.com, ns2.cloudflare.com"
  8. The resolver queries Cloudflare: "What is the IP of miip.link?"
  9. Cloudflare responds: "104.21.50.120"
  10. 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

TypePurposeExample
AMaps domain to IPv4miip.link → 104.21.50.120
AAAAMaps domain to IPv6miip.link → 2606:4700:3031::ac43:8a4a
CNAMEAlias to another domainwww.miip.link → miip.link
MXMail servermiip.link → mail.miip.link (priority 10)
TXTText records (SPF, DKIM)v=spf1 include:_spf.google.com ~all
NSName serversmiip.link → ns1.cloudflare.com
SOAStart of authorityPrimary NS, admin email, serial
SRVService records_sip._tcp.miip.link → server:port
PTRReverse DNS (IP → domain)120.50.21.104 → miip.link
CAACertificate authority authorizationWhich 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:

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

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.