DNS basics
This course explains how the Domain Name System translates domain names into IP addresses and why it runs before every HTTP request. It covers the parts of a domain name, the resolution path from root servers to authoritative nameservers, and the main record types such as A, CNAME, MX and TXT. It also covers TTL, caching layers and propagation, configuring DNS for a domain with SSL and security settings, and local DNS in Rails development with /etc/hosts, lvh.me and dig.
What you'll learn
- ✓How DNS maps domain names to IP addresses and why it mostly uses UDP on port 53
- ✓The structure of a domain name: root, TLD, SLD, subdomains and FQDN
- ✓How recursive resolvers walk root, TLD and authoritative servers, traced with dig +trace
- ✓What A, AAAA, CNAME, MX, TXT, NS, SOA, SRV and CAA records do
- ✓How TTL, caching layers and negative caching affect DNS propagation
- ✓Setting up DNS records, SSL and DNSSEC for a domain, plus local DNS for Rails development
What is DNS?
Every device on the internet has an IP address: a number like 198.51.100.34. But humans don't think in numbers. We think in names: google.com, github.com, myapp.com.
Read the full lesson free →Curriculum
7 lessonsWhat is DNS?
Explains how DNS translates domain names to IP addresses as a distributed system that runs before every request.
Domain name structure
Breaks a domain name into root, TLD, SLD and subdomains, and covers FQDNs, apex domains and registration.
DNS resolution: step by step
Follows a query from stub resolver through root, TLD and authoritative servers, with dig, failures and public resolvers.
DNS record types
Describes A, AAAA, CNAME, MX, TXT, NS, SOA, SRV and CAA records and how to query them with dig.
DNS caching and TTL
Covers TTL values, browser, OS and resolver caches, propagation, negative caching and stale connections in Rails processes.
Configuring DNS for your domain
Walks through registering a domain, choosing a DNS provider, creating records, verifying them, SSL and domain security.
DNS in Rails development
Shows how localhost, /etc/hosts, lvh.me, tld_length and config.hosts handle DNS in Rails development and deployment.