DNS, HTTP & HTTPS

DNS turns names into IPs; HTTP is the request/response protocol of the web; HTTPS secures it with TLS.

Cheat sheet

  • ▸DNS resolution: browser cache → OS → resolver → root → TLD → authoritative.
  • ▸Record types: A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail), NS, TXT.
  • ▸HTTP methods: GET, POST, PUT, PATCH, DELETE; GET/PUT/DELETE are idempotent.
  • ▸Status codes: 2xx success, 3xx redirect, 4xx client error, 5xx server error.
  • ▸HTTP is stateless — cookies/sessions/tokens add state.
  • ▸TLS: certificate verification + key exchange, then symmetric encryption.

Common status codes

CodeMeaning
200OK
201Created
301 / 302Moved permanently / temporarily
400Bad request
401 / 403Unauthenticated / Forbidden
404Not found
500Internal server error
503Service unavailable

Top 10 campus interview questions

Quick quiz

1. DNS record for IPv6:

2. Which method is NOT idempotent?

3. Status code for 'Not Found':

4. HTTPS encryption of bulk data uses:

5. Mail server DNS record: