What DNS Does
DNS connects a human-readable domain name to the server IP address where the website lives. Without DNS, users would need to remember server IP addresses instead of domain names.
Where DNS Sits In The Stack
DNS sits before the website server. This means DNS can break access to a website even when the VPS, Nginx, PHP-FPM and MySQL are all working correctly.
How It Works
When someone types a domain into a browser, the browser asks DNS resolvers for the matching IP address. The resolver checks the authoritative DNS records for that domain and returns the server IP.
Important Records
The A record points a domain to an IPv4 address. The AAAA record points to an IPv6 address. The CNAME record points one hostname to another hostname. MX records control email routing.
Infrastructure Layer
Domain & DNS
Difficulty Level
Beginner
Core Concept
DNS translates a domain name into the correct server address so browsers know where to send website traffic.
System Role
DNS is the routing layer before the server. If DNS is wrong, the website may be unreachable even when the server itself is healthy.
How It Works
The browser asks a DNS resolver for the domain IP. The resolver checks DNS records and returns the target server address. Then the browser connects to that server.
Connected Components
Domain registrar, authoritative nameservers, DNS resolver, A record, CNAME record, AAAA record, MX record, VPS IP, Nginx server block.
Common Failure Points
Wrong A record, missing www record, conflicting CNAME and A records, accidental MX record change, high TTL before migration, DNS propagation confusion.
Verification Method
Verify authoritative nameservers, root domain resolution, www resolution, active A records, email MX records and final IP address from multiple resolvers.
Basic Commands
dig example.com;
dig www.example.com;
dig MX example.com;
nslookup example.com;
curl -I https://example.com