teluzia.Cloud Engineer · Day 18
CHAPTER 03 · NETWORKING FUNDAMENTALS

DNS, HTTP, HTTPS and TLS

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Separate name resolution, application messages and transport protection in a web request. DNS discovers addresses; HTTP describes requests and responses; HTTPS runs HTTP through a secure transport arrangement using TLS. Your local lab makes these layers observable without collecting another person’s traffic. DNS maps names to records rather than simply mapping every name to one IP address. A and AAAA hold IPv4 and IPv6 addresses, CNAME aliases another name, and other record types support other services. Resolvers cache answers according to TTL and related rules; authoritative servers publish zone data. HTTP has methods, targets, headers and response status codes. GET retrieves a representation; a 404 means the requested resource was not found at the responding server, while 500 indicates server-side failure. A successful TCP connection alone is not a successful HTTP operation. Requests can succeed transport-wise while returning an application error.

Think of it this way

DNS is the directory, HTTP is the conversation format, and TLS is the authenticated sealed channel around that conversation.

TOPIC 01 / 03Step by step

DNS resolution

DNS maps names to records rather than simply mapping every name to one IP address. A and AAAA hold IPv4 and IPv6 addresses, CNAME aliases another name, and other record types support other services. Resolvers cache answers according to TTL and related rules; authoritative servers publish zone data. getent hosts localhost uses the system name-resolution path; dig example.com A, when installed, explicitly queries DNS and reveals answer records and TTL values. Distinguishing local resolution from authoritative DNS prevents debugging the wrong layer when a cached answer, hosts-file override or nonexistent name changes the destination used by a client. Assuming dig and an application always use identical resolution paths overlooks local configuration and caches; compare the actual application lookup with direct DNS evidence before drawing conclusions.

WORKED EXAMPLE
getent hosts localhost uses the system name-resolution path; dig example.com A, when installed, explicitly queries DNS and reveals answer records and TTL values.
Why this matters

Distinguishing local resolution from authoritative DNS prevents debugging the wrong layer when a cached answer, hosts-file override or nonexistent name changes the destination used by a client.

A common trap

Assuming dig and an application always use identical resolution paths overlooks local configuration and caches; compare the actual application lookup with direct DNS evidence before drawing conclusions.

MAKE IT VISIBLE

Follow a request through the system

FOLLOW THE SIGNAL

What happens after you press Enter?

Explore a common HTTPS request path. Select a stage, then inject a simulated failure to see what you would investigate.

STAGE 1

Find the destination

The browser resolves a hostname to an address using DNS. A cached answer may avoid a new lookup. If resolution fails, the request never reaches the server.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

DNS resolution

DNS maps names to records rather than simply mapping every name to one IP address. A and AAAA hold IPv4 and IPv6 addresses, CNAME aliases another name, and other record types support other services. Resolvers cache answers according to TTL and related rules; authoritative servers publish zone data. getent hosts localhost uses the system name-resolution path; dig example.com A, when installed, explicitly queries DNS and reveals answer records and TTL values. Distinguishing local resolution from authoritative DNS prevents debugging the wrong layer when a cached answer, hosts-file override or nonexistent name changes the destination used by a client. Assuming dig and an application always use identical resolution paths overlooks local configuration and caches; compare the actual application lookup with direct DNS evidence before drawing conclusions.

WORKED EXAMPLE
getent hosts localhost uses the system name-resolution path; dig example.com A, when installed, explicitly queries DNS and reveals answer records and TTL values.

Why this matters

Distinguishing local resolution from authoritative DNS prevents debugging the wrong layer when a cached answer, hosts-file override or nonexistent name changes the destination used by a client.

A common trap

Assuming dig and an application always use identical resolution paths overlooks local configuration and caches; compare the actual application lookup with direct DNS evidence before drawing conclusions.

HTTP requests and responses

HTTP has methods, targets, headers and response status codes. GET retrieves a representation; a 404 means the requested resource was not found at the responding server, while 500 indicates server-side failure. A successful TCP connection alone is not a successful HTTP operation. Requests can succeed transport-wise while returning an application error. curl -i http://127.0.0.1:8018/missing returns an HTTP 404 from a running local server; this differs from connection refused on an unused port. Reading status and headers separates application outcomes from network connectivity and helps clients handle missing resources, redirects and service failures intentionally rather than treating every response body as success. Ignoring the status code and parsing only response text can misclassify an error page as expected data; inspect status before deciding a request fulfilled its contract.

WORKED EXAMPLE
curl -i http://127.0.0.1:8018/missing returns an HTTP 404 from a running local server; this differs from connection refused on an unused port.

Why this matters

Reading status and headers separates application outcomes from network connectivity and helps clients handle missing resources, redirects and service failures intentionally rather than treating every response body as success.

A common trap

Ignoring the status code and parsing only response text can misclassify an error page as expected data; inspect status before deciding a request fulfilled its contract.

HTTPS, TLS and trust

TLS provides encrypted transport, integrity and authenticated peer identity when certificate validation succeeds. HTTPS uses HTTP over a TLS-protected connection. Certificates bind identities such as hostnames to keys through a trust system; expiry, name mismatch or untrusted issuers can cause verification failure. Encryption alone does not prove the right server. curl -I https://example.com performs certificate verification by default; curl -k bypasses it and should not become the normal fix for a certificate problem. Certificate validation connects confidentiality with destination identity and protects against impersonation, so debugging HTTPS requires checking trust and hostname rather than simply observing that traffic is encrypted somewhere. Disabling certificate verification hides the trust failure and weakens protection; diagnose clock, hostname, certificate chain and trusted issuer instead of permanently adding insecure client options to scripts.

WORKED EXAMPLE
curl -I https://example.com performs certificate verification by default; curl -k bypasses it and should not become the normal fix for a certificate problem.

Why this matters

Certificate validation connects confidentiality with destination identity and protects against impersonation, so debugging HTTPS requires checking trust and hostname rather than simply observing that traffic is encrypted somewhere.

A common trap

Disabling certificate verification hides the trust failure and weakens protection; diagnose clock, hostname, certificate chain and trusted issuer instead of permanently adding insecure client options to scripts.

KEEP THESE WITH YOU

Today’s takeaways

Separate naming, transport and application evidence.

Read status codes.

Keep TLS verification enabled.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed