Domain Name System (DNS)
| Concept | |
|---|---|
![]() Image placeholderPlace the file shown below in the assets/articles folder dns.webp | |
| Full name | Domain Name System |
| Primary purpose | Distributed naming and resource records |
| Architecture | Hierarchical, delegated and cached |
| Common record types | A, AAAA, CNAME, MX, NS, TXT |
| Core specifications | RFC 1034 and RFC 1035 |
The Domain Name System (DNS) is a distributed naming system that maps human-readable domain names to information needed by internet applications. The most familiar use is resolving a name such as example.com to an IP address, but DNS also publishes mail-routing, service-discovery and verification records. It is core internet infrastructure because people and applications can use stable names while underlying network addresses change.[1]
Hierarchical naming and delegation
DNS names form a hierarchy. The root is at the top, followed by top-level domains such as .com and country-code domains, then registrable domains and subdomains. Responsibility for parts of the namespace can be delegated. A parent zone publishes name-server records that identify the servers authoritative for a delegated child zone. This allows the global namespace to be administered by many organisations rather than one central database.
A domain name is not the same thing as a website. DNS can publish records for many services associated with a domain, and a website may use multiple hostnames for content, APIs, images and mail. Domain registration, authoritative DNS hosting, web hosting and certificate management are separate services even when a provider offers them together.
Resolution process
A device commonly asks a recursive resolver to find information for a name. The resolver may already have a cached answer. If it does not, it follows referrals through the DNS hierarchy, contacting root, top-level-domain and authoritative name servers as needed. The authoritative server returns the record for the requested name, and the resolver caches the result according to its time to live (TTL).
Caching improves performance and reduces repeated queries, but it means changes do not become visible everywhere instantly. A resolver may continue using a valid cached record until its TTL expires. Administrators should plan DNS changes with this behaviour in mind, especially when migrating services or changing mail routing. Negative responses can also be cached, affecting how quickly a newly created record becomes visible.
Common record types
An A record maps a name to an IPv4 address, while AAAA maps it to IPv6. A CNAME record points one name to another canonical name, subject to restrictions on where it may appear. MX records identify mail exchangers, NS records identify name servers, and TXT records carry text used for purposes including domain verification and email authentication. Each record type has its own semantics and should not be treated as interchangeable text.
DNS records are public by design in ordinary deployments. Sensitive information should not be placed in TXT records simply because they look like configuration fields. Zone transfers and dynamic updates need appropriate controls, and authoritative servers should be maintained and monitored.
Security and privacy
Traditional DNS queries are not encrypted by default, so observers on a network may see the names being requested. DNS over HTTPS and DNS over TLS encrypt the connection between a client and its chosen resolver, but they do not hide every aspect of network activity. DNS Security Extensions (DNSSEC) provide data-origin authentication and integrity for DNS records through a chain of signatures; they do not encrypt query names or guarantee that a destination is safe.
DNS can also be abused through cache poisoning, malicious domains, reflection attacks and misconfigured records. Resolver software, authoritative infrastructure and domain registrars need appropriate access controls and update practices. A correct DNS response only directs a client to an address; it does not establish the trustworthiness of the service found there.
DNS in a web request
When a browser loads a website, DNS resolution is one step before a transport connection is established. The client then negotiates a secure channel using TLS and exchanges HTTP messages, including modern deployments using HTTP/3. DNS therefore connects naming, routing and web application availability.
Further engineering considerations
Caching, failures and operational resilience
Caching is central to DNS performance. Resolvers retain answers for the time-to-live period supplied by authoritative servers, reducing repeated queries and helping services respond quickly. A cached answer can also remain available briefly during a temporary upstream problem, but stale or incorrect cache entries may delay recovery after a record changes. Operators should choose TTL values with both normal performance and planned changes in mind, and should understand that lowering a TTL immediately before a change does not affect copies that were already cached under an earlier value.
DNS problems can arise from delegation errors, unreachable authoritative servers, incorrect records, resolver filtering or network connectivity. Troubleshooting works best when each layer is checked separately: the client configuration, recursive resolver, delegation chain and authoritative answer. Monitoring should include more than whether a domain resolves from one location; it should check latency, response codes and the consistency of important records. DNS is a foundational dependency, so a failure can affect websites, email, authentication and service discovery at the same time.
See also
- HTTP/3 – The third major version of the Hypertext Transfer Protocol, which runs over QUIC instead of TCP.
- TLS 1.3 – The 2018 version of the Transport Layer Security protocol for encrypted network communication.
- Kubernetes – An open-source system for automating deployment, scaling and management of containerised applications.
- Event Loop – A programming construct that waits for and dispatches events or messages in a single thread of control.
- Docker – A platform for building, distributing and running applications in containers.
- Linux – A family of open-source, Unix-like operating systems based on the Linux kernel.
- PostgreSQL – An open-source object-relational database system with a strong emphasis on standards compliance and extensibility.
- Big-O Notation – A notation describing how the resource use of an algorithm grows as the input size grows.
References
- ↑ RFC 1034: Domain Names - Concepts and Facilities (rfc-editor.org)
- ↑ RFC 1035: Domain Names - Implementation and Specification (rfc-editor.org)
- ↑ Cloudflare Learning Center: What is DNS? (cloudflare.com)
