DNS

The Ultimate DNS Guide

DNS quietly underpins every internet request. A 200 ms DNS lookup adds 200 ms to every cold page load. This guide covers how DNS works, the records you need to know, how propagation actually plays out, and how to harden DNS for performance and security.

DNS Explained: Records, Propagation, Performance, Security · Everything you need to know about DNS: how lookups work, record types, propagation timing, performance tuning, and security best practices like DNSSEC and DoH. · /guides/dns-explained

How a DNS lookup works

When you type a domain, your device first checks its local cache, then asks its configured resolver. The resolver walks the DNS hierarchy: root servers, then the TLD (.com, .io), then the authoritative server for the domain itself. The final answer is cached at every step according to its TTL.

Record types you'll actually encounter

  • A / AAAA — map a hostname to an IPv4 / IPv6 address.
  • CNAME — alias one hostname to another. Can't coexist with other records at the same name.
  • MX — mail exchange. Tells SMTP servers where to deliver mail.
  • TXT — arbitrary text. Used for SPF, DKIM, domain verification, and DMARC.
  • NS — delegates authority for a zone to specific nameservers.
  • CAA — restricts which certificate authorities can issue certs for the domain.

DNS propagation in practice

"Propagation" is mostly a caching phenomenon. The authoritative change is instant, but every resolver between you and it holds the old answer until its TTL expires. Best practice: lower TTL to 300 seconds at least 24 hours before a planned change, then raise it after the new value is verified everywhere.

DNS performance tuning

Fast DNS contributes to fast page loads — especially for cold visitors and on mobile. Use a CDN-backed authoritative provider with anycast nameservers. Set sensible TTLs (3600s for stable records, 300s when actively changing). On the client side, public resolvers like 1.1.1.1 and 8.8.8.8 are typically faster than ISP defaults.

DNS security essentials

DNSSEC adds cryptographic signatures so resolvers can detect tampered answers. DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encrypt the query itself, preventing observation by your ISP or attacker on the wire. SPF, DKIM, and DMARC TXT records protect your domain from being spoofed in email.

Recommended next steps

Diagnostic workflow

  1. 1
    Look up your domain's records

    See exactly what your authoritative server returns right now.

    DNS lookup
  2. 2
    Verify propagation

    Check whether resolvers worldwide agree on the answer after a change.

    Monitoring workflow
  3. 3
    Test resolver speed

    Compare ISP vs public resolver latency.

    DNS speed test
  4. 4
    Fix common errors

    Misconfigured CNAMEs, missing MX, dangling NS — the usual suspects.

    Common DNS errors

Frequently asked questions

What is DNS in simple terms?

DNS is the internet's phone book. It translates human-readable names like example.com into the numeric IP addresses computers use to connect. Every request your device makes starts with a DNS lookup.

Why does DNS propagation take so long?

DNS responses are cached at multiple levels — your device, your router, your ISP's resolver, and public resolvers — based on each record's TTL. Lowering TTL before making changes shortens the wait.

What's the difference between A, AAAA, CNAME, and MX records?

A points a name to an IPv4 address. AAAA points to an IPv6 address. CNAME is an alias to another name. MX tells email senders which servers accept mail for the domain.

Should I use a custom DNS resolver like 1.1.1.1 or 8.8.8.8?

Often yes. Public resolvers are usually faster and more reliable than ISP defaults, and they support modern features like DNS-over-HTTPS for privacy.

Is DNS a security risk?

Unencrypted DNS can be observed and tampered with. DNSSEC validates that responses haven't been forged, and DNS-over-HTTPS/TLS encrypts queries to prevent eavesdropping.

Continue reading

Educational guide. Diagnostic checks run entirely in your browser.