What does DNS do and what happens when you type a URL into a browser?

BeginnerConceptDNS
Answer

DNS translates names to IP addresses. The browser checks its cache, then the OS cache and /etc/hosts, then asks the configured recursive resolver. The resolver, if it has no cached answer, walks the hierarchy: root servers, the TLD servers (.com), then the domain's authoritative servers, and returns the answer to the client, caching it for the TTL.

Only after that does the TCP and TLS work to the returned IP begin.

All Networking questions Roadmap: Networking for DevOps

More on DNS