Skip to main content
AllDevToolsHub
Back to Glossary

DNS (Domain Name System)

The 'phonebook' of the internet, which translates human-readable domain names into machine-readable IP addresses.

Detailed Explanation

When you type `google.com`, your computer asks a DNS resolver for the corresponding IP address (e.g., `142.250.190.46`). This process involves multiple steps: Recursive resolvers, Root servers, TLD servers, and Authoritative nameservers. DNS caching at every level is what makes the web feel fast. 'Propagation' refers to the time it takes for DNS changes to spread globally.

Quick Summary

DNS turns domain names into IP addresses so humans don't memorize numbers. It's hierarchical, heavily cached, and the cause of a remarkable share of outages, "it's always DNS" is half-joke, half-truth.

Key Takeaways

Key Takeaways

  • Record types: A/AAAA (IPv4/IPv6), CNAME (alias), MX (mail), TXT (verification/SPF/DKIM), NS (nameservers), CAA (cert authority).
  • TTL controls how long resolvers cache a record, short TTLs ease changes but increase query load.
  • Propagation isn't a thing the spec defines, it's the wall-clock time before every cache around the world expires the old answer.
  • DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encrypt resolution traffic; ECH hides the SNI hostname.
  • Authoritative DNS providers (Cloudflare, Route53, NS1) are critical infra, outages here cascade everywhere.
Use Cases

When to use it

  • Pointing your domain at a load balancer or CDN.
  • Geo-routing or weighted-round-robin DNS for traffic splitting.
  • Domain ownership and email auth via TXT records (Google verification, SPF, DKIM, DMARC).
  • Service discovery in internal infrastructure (Consul, Kubernetes DNS).
Watch out

Common Mistakes

  • Setting TTLs to 86400 (1 day) and then needing to migrate, you'll wait the full day for changes to roll out.
  • CNAME at the apex (root) of a domain, disallowed by spec; use ALIAS, ANAME, or flattening at your DNS provider.
  • Forgetting that DNS resolution happens before TLS, a wrong IP doesn't get caught by certificate checks alone.
  • Single-provider DNS for critical apps; an outage at one provider takes you down. Some teams run secondary DNS.
FAQ

DNS (Domain Name System), Frequently Asked

Why are my DNS changes not showing up?

Caching. Resolvers between you and the authoritative server keep the old record until its TTL expires. Lower TTL before the migration, change records, then raise TTL again. Check with `dig` from multiple resolvers to see the cache state.

Should I use Cloudflare or Route53?

Both are excellent. Cloudflare bundles DNS with CDN/security and has the best free tier. Route53 integrates deeply with AWS (alias records to ALBs, health checks). Pick by where your other infrastructure lives.