Understanding URLs, Domain Names, IP Addresses, and DNS Resolution
This article explains the concepts of URLs, domain names, IP addresses, and the DNS system, describing how human‑readable web addresses are translated into numeric IPs through a hierarchical name‑resolution process, and why this mechanism is essential for everyday Internet usage.
Today we present a comprehensive, plain‑language guide on URLs, IP addresses, domain names, DNS, and the domain‑resolution process, using a simple Q&A format to help readers grasp these fundamentals for study, interviews, and work.
1. A Question
Before addressing the question, we must understand three points: all data on the Internet is stored on hosts (servers); every host has a unique IP address; communication between any two hosts relies on IP addresses.
When two hosts communicate via the simplest method—browsing the web—we input a URL, not an IP address, yet the system finds the correct host. This raises the question: how does a URL get resolved to an IP address?
The mechanism that translates a URL into an IP address is the main thread of this article.
2. URL
1. What is a URL?
A URL (Uniform Resource Locator) is the human‑readable name used to identify a host on the Internet; it is unique, hierarchical, and often reflects the host’s purpose, organization, or location.
URL structure and example:
Features: URLs follow domain naming rules, are easy to manage, and are bound to IP addresses so that when a user accesses a domain, the mapping to an IP is performed efficiently by DNS.
2. What problems does a URL solve?
IP addresses are numeric and hard to remember; URLs provide meaningful, memorable names.
Most application‑level software accesses resources by name rather than by raw IP.
3. URL composition
The host name follows a rule set defined by the Domain Name System (DNS). A typical domain name format is:
主机名.机构名.网络名.顶级域名3. DNS (Domain Name System)
1. What is DNS?
DNS is a distributed database that provides a mapping between domain names and IP addresses.
2. History of DNS
3. What problems does DNS solve?
Before DNS, each host maintained a large "hosts.txt" file mapping names to IPs, which became unwieldy as the Internet grew. DNS replaced this with a scalable, hierarchical system.
4. DNS hierarchical structure
DNS is a tree‑like hierarchy consisting of root zones, top‑level domains (TLDs), second‑level domains, and sub‑domains.
Root servers are managed by InterNIC and are represented by a dot “.”. TLDs include country code TLDs (ccTLD) and generic TLDs (gTLD). Second‑level domains are unique names registered by organizations (e.g., amazon.com). Sub‑domains can be created under second‑level domains for departmental use.
5. DNS servers
DNS servers form a distributed network that resolves domain names to IP addresses. Types include:
Root name servers (13 global servers, each with multiple instances).
Top‑level domain servers (manage records for their TLD).
Authoritative name servers (store records for specific zones).
The local DNS server (often provided by an ISP) is the first point of contact for a client’s query.
4. Domain name resolution process
The resolution steps are:
User enters a URL; the browser sends a query to the local DNS server.
If the local cache contains the IP, it returns it; otherwise it queries a root server.
The root server points to the appropriate TLD server (e.g., .com).
The TLD server points to the authoritative server for the domain.
The authoritative server returns the final IP address, which is cached locally for future queries.
Summary
This article uses simple language and visual diagrams to explain the principles behind URLs, domain names, IP addresses, DNS, and the resolution process, aiming to help readers learn and apply these concepts in their studies and work.
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.