DNS
DNS (Domain Name System) is the internet's address book: it translates a human-readable domain name such as bebranded.xyz into the numeric IP address a server actually answers on. Every time someone types your domain, clicks a link or an app calls your API, a DNS lookup runs first to find where that name lives. Without it, you would have to remember strings like 192.0.2.10 for every site you visit. DNS is what lets names stay stable while the servers behind them change.
What is DNS?
DNS is a distributed, hierarchical database that maps domain names to resources, most often IP addresses. It is distributed because no single machine holds the whole internet: the answer for your domain is delegated down a chain, from the root servers to the top-level domain (.xyz, .com, .fr), then to the authoritative name servers you configure. It is hierarchical because a domain reads right to left, from the most general zone to the most specific host. This design lets billions of names resolve in milliseconds while staying manageable by their individual owners.
For a website or a web app, DNS is the layer that decides whether visitors reach you at all. A misconfigured record can take a site offline even when the server is perfectly healthy, which is why DNS deserves the same care as hosting or code.
How DNS works: from domain to IP address
A lookup, called a DNS query, walks the hierarchy step by step. Your device first asks a resolver (usually your provider's or a public one like 1.1.1.1). If the resolver has no cached answer, it asks a root server, which points to the .xyz servers, which point to the domain's authoritative name servers, which finally return the IP. The resolver then caches the result so the next visitor is answered instantly.
In practice you rarely see the query, but you can trigger one from a terminal:
dig bebranded.xyz A +short
nslookup bebranded.xyz
The response is an answer record carrying the IP address and a TTL (time to live) that tells resolvers how long to keep it before asking again.
The main DNS record types
A DNS zone is a set of records, each with a type that defines what it points to. The handful you meet most often:
- A: maps a name to an IPv4 address.
- AAAA: maps a name to an IPv6 address.
- CNAME: aliases one name to another (for example www to the root domain).
- MX: routes email to your mail servers, with a priority value.
- TXT: holds free text, used for SPF, DKIM and domain verification.
- NS: declares the authoritative name servers for the zone.
DNS records compared
| Record | Points to | Typical use |
|---|---|---|
| A | IPv4 address | Apex domain and subdomains |
| AAAA | IPv6 address | IPv6-enabled hosts |
| CNAME | Another domain name | www and subdomain aliases |
| MX | Mail server (with priority) | Receiving email |
| TXT | Free text string | SPF, DKIM, verification |
| NS | Authoritative name servers | Delegating the zone |
DNS propagation and TTL
When you change a record, the update is not instant everywhere. Resolvers around the world keep the old value until its TTL expires, a delay commonly called DNS propagation. A record with a TTL of 3600 seconds can be cached for up to an hour; a TTL of 300 seconds refreshes every five minutes but adds slightly more query traffic. Before a migration, lowering the TTL a day ahead shortens the switch-over window, then you raise it again once the new value is stable. Propagation is not a single global clock: different networks pick up the change at different moments, which is why a new site can appear for you and not yet for a colleague.
Common DNS pitfalls and best practices
Most outages blamed on hosting are really DNS mistakes. A CNAME placed on the apex domain where the provider does not support it, an MX record pointing at a decommissioned server, or a forgotten TTL of 86400 that freezes a bad value for a full day are classic examples. Keep records documented, use sensible TTLs (low before a change, higher once stable), and never delete a record you do not understand. Adding SPF, DKIM and DMARC TXT records protects your domain from email spoofing. When a provider like Cloudflare sits in front, remember the record you see may be proxied, which changes the IP visitors actually reach.
DNS at BeBranded
When we ship or redesign a site, we handle the DNS cutover so the switch to the new build is clean and downtime-free: TTL lowered ahead of time, records mapped, email left untouched, and every change verified before we call it done. It is part of delivering a website your team can run without nasty surprises.