← ip-tracker.eu
Networking Guide

How Does DNS Work?

8 min read  ·  DNS resolution, record types, caching, TTL & privacy

// What is DNS?

The Domain Name System (DNS) is the internet's phone book. It translates human-readable domain names like google.com into machine-readable IP addresses like 142.250.74.46. Without DNS, you would need to memorise the IP address of every website you want to visit.

DNS is a distributed, hierarchical database. No single server holds all domain information — instead, responsibility is split across millions of servers worldwide. This design makes DNS fast, resilient, and scalable to billions of queries per day.

DNS operates primarily over UDP port 53 for speed, falling back to TCP port 53 for responses larger than 512 bytes or for zone transfers between authoritative servers.

// DNS Resolution Step by Step

When you type example.com into your browser, a complex lookup process happens in milliseconds:

01
Browser cache — Your browser checks its own DNS cache. If it recently looked up example.com, it reuses the stored IP without any network query.
02
OS cache / hosts file — If the browser has no record, it asks the operating system. The OS checks its DNS cache and the local /etc/hosts (Linux/Mac) or C:\Windows\System32\drivers\etc\hosts (Windows) file.
03
Recursive resolver — The OS contacts your configured recursive DNS resolver (typically your ISP's resolver, or a public one like 8.8.8.8 or 1.1.1.1). This resolver does the heavy lifting on your behalf.
04
Root nameservers — If the resolver has no cached answer, it contacts one of 13 root nameserver clusters (operated by ICANN, Verisign, etc.). The root server doesn't know the IP — it responds with the address of the TLD nameserver for .com.
05
TLD nameservers — The resolver queries the .com TLD nameserver (operated by Verisign). It responds with the address of example.com's authoritative nameservers.
06
Authoritative nameservers — The resolver queries example.com's own nameservers (e.g. ns1.example.com). These servers hold the definitive DNS records and return the IP address.
07
Response — The resolver returns the IP to your browser, caches it for future queries, and your browser connects to the web server at that IP.
💡 The entire process typically takes 20–120 ms on the first query. Subsequent queries are served from cache in under 1 ms.

// DNS Record Types

DNS stores information in resource records. Each record type serves a different purpose:

TypePurposeExample Value
AMaps domain to IPv4 address93.184.216.34
AAAAMaps domain to IPv6 address2606:2800:220:1:248:1893:25c8:1946
CNAMEAlias — points to another domain namewww → example.com
MXMail exchanger — routes email10 mail.example.com
NSNameserver — delegates DNS authorityns1.example.com
TXTArbitrary text — SPF, DMARC, verificationv=spf1 include:... -all
SOAStart of Authority — zone metadataSerial, refresh, retry intervals
PTRReverse DNS — IP to hostnamemail.example.com
SRVService location — port & protocol_sip._tcp 10 60 5060 sip.example.com
CAACertificate authority authorisation0 issue "letsencrypt.org"

You can look up all DNS records for any domain using ip-tracker.eu — it queries A, AAAA, MX, NS, TXT, and SOA records in real time.

// TTL — Time to Live

Every DNS record has a TTL (Time to Live) value measured in seconds. TTL tells resolvers how long they may cache the record before re-querying the authoritative server.

TTL ValueDurationBest For
3005 minutesRecords you plan to change soon (migrations)
36001 hourStandard web records
8640024 hoursStable, rarely-changed records
6048007 daysVery stable records (MX for established domains)

When you change a DNS record, the change propagates globally only after the old TTL expires on all caching resolvers. This is why DNS changes can take up to 48 hours to "propagate" — older resolvers may serve cached data until their TTL runs out.

💡 Before making DNS changes, lower the TTL to 300 seconds 24 hours in advance. After the change, you can raise it back to 3600+.

// The SOA Record

The Start of Authority (SOA) record is the first record in every DNS zone. It defines administrative information about the zone:

// Public DNS Resolvers

By default, your device uses the DNS resolver assigned by your ISP. You can override this with a faster or more privacy-focused public resolver:

ProviderIPv4Features
Google8.8.8.8 / 8.8.4.4Fast, global, widely trusted
Cloudflare1.1.1.1 / 1.0.0.1Fastest resolver, privacy-first, no logging
Quad99.9.9.9Blocks malicious domains, privacy-focused
OpenDNS208.67.222.222Content filtering options

Cloudflare's 1.1.1.1 consistently ranks as the fastest public resolver in global benchmarks, with average response times under 15 ms.

// DNSSEC — Securing DNS

DNSSEC (DNS Security Extensions) adds cryptographic signatures to DNS responses, allowing resolvers to verify that the data hasn't been tampered with in transit. Without DNSSEC, attackers can perform DNS cache poisoning — injecting false records into a resolver's cache to redirect users to malicious sites.

DNSSEC uses a chain of trust from the root zone down to individual domain records. Each zone signs its records with a private key; resolvers verify the signature using the corresponding public key published in DNS.

DNSSEC protects against data forgery but does not encrypt DNS queries. For query privacy, use DNS over HTTPS (DoH) or DNS over TLS (DoT).

// DNS Privacy — DoH and DoT

Traditional DNS queries are sent in plaintext over UDP, meaning your ISP, network administrators, and anyone on the network path can see every domain you look up. Two protocols address this:

DNS over HTTPS (DoH)

DoH sends DNS queries over HTTPS (port 443), making them indistinguishable from regular web traffic. Supported natively by Firefox, Chrome, and Edge. Cloudflare, Google, and NextDNS offer DoH endpoints.

DNS over TLS (DoT)

DoT encrypts DNS queries using TLS on a dedicated port (853). More transparent than DoH — network administrators can allow or block it by port, while DoH blends with HTTPS traffic.

💡 Both DoH and DoT hide your DNS queries from the network level but still expose them to your chosen resolver. Choose a resolver with a clear no-logging policy.

// Common DNS Tools

These command-line tools let you query DNS directly:

nslookup example.com                  # Windows / all platforms
dig example.com A                      # Linux/Mac — query A record
dig example.com MX                     # query MX records
dig @1.1.1.1 example.com               # use specific resolver
dig -x 93.184.216.34                   # reverse DNS lookup

Or use ip-tracker.eu for a visual DNS lookup with no command line required.

Look up DNS records for any domain

A, AAAA, MX, NS, TXT, SOA records — instant lookup, no tools required.

Try IP & Domain Tracker →

// Related Articles