How to explain to students
When you type https://banoqabil.pk in a browser, your computer doesn't know where that is. DNS (Domain Name System) is the phone book that translates a name into an IP address. The lookup hops through 4 levels — your resolver, the root, the TLD (.pk), and finally an authoritative server — but is heavily cached so most queries return in milliseconds.
DevOps engineers don't usually run their own DNS — they configure records at a managed provider (Route 53, Cloudflare, Google Cloud DNS). The skill is reading dig output and knowing which record type does what.
dig name, dig -x IP, dig +trace, dig @resolver.🎯 Practice Questions
Show Answer
Root server — knows which nameservers handle each TLD (
.pk, .com, .io). 13 logical root servers globally.TLD server — for a TLD like
.pk, knows which nameservers run each domain under it.Authoritative server — the actual owner of
banoqabil.pk's records. This one returns the IP. It's the source of truth; everyone else is caching.
dig to find: (a) the NS records for github.com, (b) the IPv6 (AAAA) record for cloudflare.com, (c) the MX record for gmail.com. Write the three commands.How to explain to students
Two separate things often confused: domain registrar (where you buy the domain — Namecheap, Google Domains, Route 53) and DNS hosting (where the records actually live — Route 53, Cloudflare, the registrar). You can buy a domain at Namecheap and host the DNS at Route 53 — common pattern.
In Route 53, a hosted zone is a container for all records for one domain. AWS gives you 4 nameservers — you tell your registrar to use those, and Route 53 becomes authoritative. After that, you can connect any AWS service (S3, CloudFront, Beanstalk, ALB) to a custom domain.
🎯 Practice Questions
example.com at Namecheap and want DNS in Route 53. What exactly do you change at Namecheap, and why is the change required?Show Answer
ns-123.awsdns-12.com, etc.).Why: the global DNS hierarchy needs to know who is authoritative for your domain. Until you change the NS at the registrar, the
.com TLD points to Namecheap's nameservers, so any record you create in Route 53 is invisible to the world. After the change (which propagates in 1–48 hours), the .com TLD points queries to Route 53.
How to explain to students
Each record type answers one question. Memorise the cheat sheet, and 95% of "why isn't email working" / "why does my site not load" is solvable in 5 minutes.
🎯 Practice Questions
blog.example.com → example.com, (b) Gmail incoming mail, (c) Google Site verification, (d) example.com → CloudFront URL.Show Answer
(b) MX — points to
aspmx.l.google.com with priority 1, plus alternates.(c) TXT — Google's verification string lives in a TXT record on the apex.
(d) ALIAS A — apex (
example.com) cannot use CNAME. Route 53's ALIAS A record solves this — DNS resolvers see an A record, but it's resolved dynamically against CloudFront. Outside Route 53, the alternative is "ANAME" or flattened-CNAME from Cloudflare.
example.com CNAME www.example.com. Why is this invalid?NXDOMAIN in dig. List three places to check before assuming the record is missing.How to explain to students
Every AWS service that serves traffic gets a default ugly URL (d1234.cloudfront.net, app-prod.eu-west-1.elasticbeanstalk.com). Pointing a custom domain at it is two steps: (1) get a TLS cert that covers your domain, (2) create an ALIAS A record in Route 53 pointing at the AWS service's hosted-zone target.
🎯 Practice Questions
Show Answer
ALIAS A is Route 53's solution: looks like an A record to the world, but Route 53 dynamically resolves it to AWS's current IPs. Bonus: ALIAS records are free to query (unlike CNAME) and work on the apex.
api.example.com at an ALB. dig resolves correctly but curl returns "SSL: certificate verification failed". What's the most likely cause?How to explain to students
A CDN (Content Delivery Network) caches your content at hundreds of edge locations around the world. When a user in Karachi requests style.css, the closest edge serves it from cache — never touching your origin S3 bucket in Frankfurt. Result: 10–50× faster page loads, lower bandwidth bills, DDoS protection.
CloudFront and Cloudflare are the two giants. CloudFront integrates tightly with AWS (S3, ALB, Lambda@Edge). Cloudflare is registrar-agnostic, free tier is generous, and it adds DDoS + WAF in front of any backend. For BanoQabil-region students, both have edges in Karachi, Lahore, and Mumbai.
/index.html only — not /*.🎯 Practice Questions
Show Answer
index.html for whatever Cache-Control: max-age said. Fix: aws cloudfront create-invalidation --paths /index.html.2. Browser cache. Even after CDN purge, the user's browser may have cached
index.html locally. Test in incognito or hard-refresh (Cmd+Shift+R).3. S3 itself hasn't propagated, or you forgot to
aws s3 sync. Always verify aws s3 ls + check the actual object's LastModified.Pro tip: set short cache (60s) on
index.html and long cache (1y, immutable) on hashed assets like main.abc123.js. Best of both worlds.
How to explain to students
HTTPS is just HTTP wrapped in TLS. When a browser connects to https://example.com, the server sends a certificate proving "I am example.com" — signed by a Certificate Authority the browser trusts. They negotiate a session key and encrypt all traffic.
In 2026, certificates are free and automated. AWS users get ACM (free, auto-renews, integrates with CloudFront/ALB/API Gateway). Everyone else uses Let's Encrypt via Certbot — free, 90-day certs, auto-renewal. There is essentially no reason to pay for a regular DV certificate today.
🎯 Practice Questions
us-east-1, even when the rest of your stack is in eu-west-1?Show Answer
us-east-1. CloudFront only reads ACM certificates from us-east-1. Your S3 bucket / ALB / origin can live anywhere — the cert is the only resource pinned to us-east-1.For ALBs in
eu-west-1, you request a separate ACM cert in eu-west-1 — those work fine for ALB usage. The us-east-1 rule is CloudFront-specific.
https://api.example.com. Where do you start debugging?api.example.com?How to explain to students
Performance comes down to two ratios: cache-hit ratio (% of requests served from edge, not origin) and compression ratio (gzip/brotli). The first is governed by Cache-Control headers; the second by enabling compression at the CDN.
The "long-cache for hashed assets, short-cache for index" pattern is the canonical setup. Your bundler (Vite, Webpack) outputs main.abc123.js with a content hash in the filename — set Cache-Control: public, max-age=31536000, immutable and never invalidate. The single index.html gets max-age=60 + invalidate after every deploy.
🎯 Practice Questions
Cache-Control: public, max-age=31536000, immutable safe for main.abc123.js but disastrous for index.html?Show Answer
Cache-Control headers at the origin. Many CDN misses are because the origin returns no cache directive — CDN defaults to short or no caching.2. Hash your asset filenames (Webpack/Vite/Astro do this automatically). With content-hash in the name, you can confidently set
max-age=31536000, immutable.3. Reduce cache fragmentation. Each unique URL is its own cache entry. Watch out for cache-busting query strings like
?v=12345 that change on every deploy and bypass the cache. Use hashed filenames instead. Also strip irrelevant query params at the CDN.Bonus: enable stale-while-revalidate so users get cached responses instantly while CDN refreshes in the background.
dig, curl -v, and openssl s_client output is dense — AI translates it perfectlyHow to explain to students
Networking errors come with terse, jargon-rich output: "NXDOMAIN", "SSL_ERROR_BAD_CERT_DOMAIN", "SERVFAIL". AI is excellent at translating these into "what's broken and where". Always paste the full error + the command that produced it — no PII, but the protocol-level data is fine.
Trap: AI will sometimes hallucinate AWS-specific defaults (e.g. claim ACM certs work outside us-east-1 for CloudFront). Verify against the actual AWS docs for any region/cross-service claim.
🎯 Practice Questions
dig output to AI generally safe, but pasting a real kubectl get secrets output dangerous?https://<name>.com serving their CV, $1/month totalHow to explain to students
This is the "first deploy that recruiters actually see." Walk through it on screen. The artefact: a real domain like https://muzammilbilwani.com serving a static CV / portfolio, $1–2/month, A+ on SSL Labs, sub-second load anywhere.
Sample quiz questions (interactive)
example.com)?Fill-in-the-command
dig command for the MX records of banoqabil.pk, short form.example.com auto-configuring nginx.How to explain to students
Frame as a real client task: "Move my site to Cloudflare. I want HTTPS everywhere, cache static assets aggressively, redirect www → apex, and block traffic from one country. By Friday." This forces students through Cloudflare's full DNS / SSL / Page Rules workflow with a verifiable end state.
📋 Assignment Requirements
- Pick any domain you control (or buy one for $1 at Namecheap/Cloudflare)
- Add the domain to a free Cloudflare account; switch the registrar's nameservers to Cloudflare's
- Verify
dig NS yourdomain.com +shortshows two*.ns.cloudflare.comnameservers - Set up an A or CNAME record pointing at any origin (an S3 static site, a Vercel deploy, a free EC2)
- Force "Always Use HTTPS" — verify
curl -sI http://yourdomain.comreturns a 301 tohttps:// - Set the SSL/TLS mode to Full (Strict) — your origin must have a valid cert
- Add a redirect rule:
www.yourdomain.com→yourdomain.com(or vice versa) - Configure caching: HTML
max-age=60, static assetsmax-age=1y, verify withcurl -sI+cf-cache-statusheader - Add a Page Rule that bypasses cache for
/admin/* - Run an SSL Labs test — must score A or higher. Screenshot it.
- Bonus: Enable Brotli + HTTP/3 → verify with
curl --http3 -sI - Bonus: Add a firewall rule blocking traffic from one country and demonstrate it
- Submit a 1-page README documenting each setting + screenshots of the verification commands