Domain names are human-friendly names for websites, such as www.example.com, while computers communicate using IP addresses, such as 93.184.216.34. The Domain Name System, or DNS, acts like a global directory that translates names into addresses. This matters because people can remember words more easily than long strings of numbers.
Every time you visit a website, send an email, or use many online apps, DNS helps connect your device to the right server.
When you type a domain name, your device usually asks a DNS resolver to find the matching IP address. If the answer is not already cached, the resolver may contact root servers, top-level domain servers, and authoritative name servers in order. The result is returned to your device, which can then open a connection to the web server.
DNS also uses records, time limits, and caching to make lookups faster and reduce traffic across the internet.
Understanding How Domain Names Work
A domain name is built from labels separated by dots. The label furthest to the right is the top level domain, such as com, org, or uk. The label before it is usually registered by a person, school, business, or organisation.
That owner can create more labels beneath it, such as shop.example.com or physics.example.com. This structure allows different parts of the internet to manage their own names without one central office storing every detail.
A registrar sells or manages registrations, while a registry operates the list for a top level domain. Registration gives control of a name for a limited period, so domains must be renewed.
DNS stores several kinds of information, not just website addresses. A CNAME record makes one name act as an alias for another name. This is useful when a service moves to a different host while visitors keep using the same familiar address.
MX records tell email systems which servers accept mail for a domain. TXT records hold text data used for checks such as proving domain ownership or reducing forged email.
A website may use different records for its main site, its email, and its online services. This is why changing one DNS record does not necessarily affect every service using the same domain.
After DNS provides an address, more steps are still needed before a page appears. The browser connects to that address, usually using a secure HTTPS connection. It sends the requested host name during the connection.
This matters because one server address can host many websites. The server uses the host name to choose the correct website and security certificate. A domain name therefore helps at several stages.
It helps find a destination, identifies the intended site, and supports secure connections. A correct address alone may not be enough if the browser requested the wrong host name or receives a certificate for a different domain.
Caching makes DNS fast, but it can make changes seem slow. When a domain owner changes a record, old answers may remain in resolvers, browsers, routers, or devices until their allowed reuse time ends. People often call this DNS propagation, though the new record is normally available at the authoritative server as soon as it is published.
Different users may temporarily reach different servers because their caches expire at different times. A short reuse time helps when a change is planned, but it creates more DNS requests. A long reuse time reduces requests, yet delays visible updates.
Students should treat DNS answers carefully because DNS was not originally designed to prove that every answer is genuine. Attackers can sometimes redirect users through changed settings, fake wireless networks, or compromised resolvers. DNSSEC can add digital signatures that help resolvers detect altered records, although it is not used everywhere.
Secure HTTPS certificates give another important check by showing whether a site controls its claimed domain. When troubleshooting, check spelling first, then test whether the problem affects one device or many. A name that fails on one network may point to a resolver or cache problem rather than a broken website.
Key Facts
- A domain name maps a readable name to an IP address, such as www.example.com to 93.184.216.34.
- DNS lookup path: client to recursive resolver to root server to TLD server to authoritative name server.
- A record: domain name to IPv4 address, for example example.com to 93.184.216.34.
- AAAA record: domain name to IPv6 address, for example example.com to 2606:2800:220:1:248:1893:25c8:1946.
- TTL means time to live and tells caches how many seconds a DNS answer may be reused.
- Total lookup time can be estimated as T = n × RTT when n sequential network round trips are needed.
Vocabulary
- Domain name
- A domain name is a readable internet name that identifies a service or website, such as www.example.com.
- IP address
- An IP address is a numerical network address used to locate a device or server on the internet.
- DNS resolver
- A DNS resolver is a server that receives DNS questions from clients and finds or returns the matching answer.
- Authoritative name server
- An authoritative name server stores the official DNS records for a domain.
- DNS record
- A DNS record is a stored piece of information that connects a domain name to data such as an IP address or mail server.
Common Mistakes to Avoid
- Confusing a domain name with a website is wrong because the domain is only the address label, while the website is the content served after a connection is made.
- Assuming DNS always contacts every server is wrong because cached answers can skip much of the lookup process.
- Thinking one domain has only one IP address is wrong because domains can use multiple records for load balancing, redundancy, or different network types.
- Ignoring TTL values is wrong because cached DNS answers can remain in use until their time to live expires, even after a record is changed.
Practice Questions
- 1 A DNS resolver needs 4 sequential round trips to answer a query, and each round trip takes 25 ms. Estimate the total DNS lookup time.
- 2 A DNS record has a TTL of 1800 seconds. Convert this TTL to minutes, and state how long a cache may reuse the answer.
- 3 A student says that typing www.example.com sends the browser directly to the web server without any translation step. Explain why this is incomplete and describe the role of DNS in the process.