What is DNS, and what are common DNS record types?
BeginnerConceptNetworking basics for DevOps
Answer
In one line: DNS (Domain Name System) is the internet's phone book — it translates human-friendly names like example.com into IP addresses and other information computers need.
How a lookup works (simplified):
- Your computer asks a recursive resolver (from your ISP, or 8.8.8.8, 1.1.1.1).
- If it isn't cached, the resolver asks a root server → the TLD server for
.com→ the authoritative name server forexample.com. - The answer is returned and cached for the record's TTL (time to live).
Common record types:
| Record | Purpose | Example |
|---|---|---|
| A | Name → IPv4 address | api.example.com → 203.0.113.10 |
| AAAA | Name → IPv6 address | api.example.com → 2001:db8::10 |
| CNAME | Alias to another name | www.example.com → example.com |
| MX | Mail servers for the domain | example.com → mail.example.com |
| TXT | Text data: domain verification, SPF, DKIM | v=spf1 include:_spf.google.com ~all |
| NS | Which name servers are authoritative | example.com → ns1.provider.com |
| SOA | Zone administrative info | serial number, refresh times |
| SRV | Service location (host and port) | used by some protocols |
| CAA | Which certificate authorities may issue certs | 0 issue "letsencrypt.org" |
Cloud providers also offer alias records (Route 53 Alias, Azure alias records) that point the root domain at a load balancer or CDN.
DevOps tips:
- Lower the TTL before migrations (for example to 60 seconds a day before), so changes spread quickly; raise it again afterwards.
- Manage DNS as code (Terraform with Route 53, Azure DNS or Cloudflare) and automate records with ExternalDNS in Kubernetes.
- Inside Kubernetes, CoreDNS resolves service names like
orders.payments.svc.cluster.local. - "It's always DNS" is a running joke for a reason — check DNS early when debugging connectivity.
Debugging:
dig api.example.com +short
dig api.example.com CNAME
nslookup api.example.com
Tip for interviews: explain A vs CNAME clearly and mention TTL strategy for migrations.
More on Networking basics for DevOps
What happens when you type a URL in the browser and press Enter?BeginnerWhat is the difference between TCP and UDP?BeginnerWhat are ports, and which common ports should a DevOps engineer know?BeginnerWhat is the difference between a forward proxy and a reverse proxy?BeginnerWhat is a CDN, and how does it help applications?BeginnerWhat are VPCs, subnets and security groups?Beginner