# DNS (Domain Name System)

URL: https://softwaredictionary.org/terms/dns
Category: DevOps & Cloud
Last updated: 2026-09-30

In short: DNS is the internet's naming system that translates human-readable domain names like example.com into the numeric IP addresses computers use to connect.

## What is DNS?

DNS, the Domain Name System, is often called the phone book of the internet. People remember names like `example.com`, but computers find each other using numeric IP addresses such as `203.0.113.10` (IPv4) or `2001:db8::10` (IPv6). DNS translates the name into the address, so your browser knows which server to contact.

When you visit a website, your device asks a recursive resolver, usually run by your internet provider, your company, or a public DNS service, for the address. If the resolver has no cached answer, it walks the hierarchy: a root server points it to the servers for the top-level domain (such as `.com`), which point it to the domain's authoritative name servers, which return the final answer. The resolver then caches the result for a period called the TTL (time to live), so most repeat lookups take only a few milliseconds.

A domain's DNS settings are made up of records. An `A` record maps a name to an IPv4 address, an `AAAA` record maps it to an IPv6 address, a `CNAME` record makes one name an alias for another, `MX` records say which servers receive email for the domain, and `TXT` records hold text used for things like domain verification and email security. Developers edit these records whenever they point a domain at a new server, load balancer, CDN, or hosting platform.

DNS is often confused with domain registration or web hosting. A registrar is where you buy and renew the domain name, a DNS provider hosts the records that say where the domain points, and a hosting provider runs the actual website; one company may do all three, but they are separate jobs. Because of caching, DNS changes are not instant: old answers may be served until their TTL expires, which is why people talk about waiting for DNS propagation.

## Key takeaways

- DNS translates domain names into IP addresses.
- Resolvers find answers by querying root, top-level domain, and authoritative name servers.
- Common record types are `A`, `AAAA`, `CNAME`, `MX`, and `TXT`.
- Answers are cached for a time set by each record's TTL.
- DNS changes can take time to appear everywhere because of caching.

## Example: Looking up DNS records from the command line

```bash
# Look up the IPv4 address (A record) for a domain
dig example.com A +short

# Find which servers receive email for the domain
dig example.com MX +short

# Show the full answer, including the TTL in seconds
dig www.example.com

# A basic lookup with a tool available on most systems, including Windows
nslookup example.com
```

## Frequently asked questions

**What is DNS propagation?**

DNS propagation is the time it takes for a DNS change to be seen everywhere. Resolvers around the world keep cached copies of old records until their TTL expires, so updates can take anywhere from a few minutes to a day or two.

**What is the difference between an A record and a CNAME record?**

An A record points a name directly to an IPv4 address. A CNAME record points a name to another domain name, which is then resolved to an address; a standard CNAME cannot be used at the root of a domain, such as `example.com`, because it cannot coexist with the other records required there.

**What port does DNS use?**

DNS traditionally uses port 53, over UDP for most queries and TCP for large responses. Encrypted variants, DNS over HTTPS (DoH) and DNS over TLS (DoT), use ports 443 and 853 to keep lookups private.

## Sources

- [RFC 1034: Domain Names – Concepts and Facilities](https://www.rfc-editor.org/rfc/rfc1034.html)
- [RFC 1035: Domain Names – Implementation and Specification](https://www.rfc-editor.org/rfc/rfc1035.html)

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
