Guides
DNS and Nameservers Explained: How a Domain Finds Its Server
2026-06-29 · OSIR Team
Summary: When someone types your domain, their computer asks the Domain Name System (DNS) to translate that name into an IP address. The translation starts at your nameservers - the servers, listed on the domain itself, that hold the authoritative answers. Inside those nameservers live DNS records: an A record points the name to an IPv4 address, a CNAME aliases one name to another, an MX record routes email, and so on. This guide explains how a lookup travels from the root to your server, what each record type does, and why changes take time to propagate.
How a DNS lookup works (the chain)
A single visit to example.com triggers a four-step resolution, usually in milliseconds:
| Step | Who answers | What it returns |
|---|---|---|
| 1. Root | Root nameservers | "Ask the .com registry's servers." |
| 2. TLD | The TLD's nameservers (e.g. Verisign for .com) |
"Ask these nameservers for example.com." |
| 3. Authoritative | Your domain's nameservers | The actual record (e.g. A -> 93.184.216.34). |
| 4. Resolver | Your ISP / public resolver (1.1.1.1, 8.8.8.8) | Caches the answer and hands it back to the browser. |
The resolver does the legwork and caches each answer for a set time, so the full chain only runs when nothing is cached.
Define: DNS (Domain Name System) is the internet's address book - it maps human-readable names (
osir.com) to machine addresses (IP numbers).
What a nameserver is
A nameserver is the server that holds the authoritative DNS records for your domain and answers queries about it. Your domain lists its nameservers at the registry (set through your registrar), usually as hostnames like ns1.example-dns.com and ns2.example-dns.com. Whoever controls those nameservers controls where your domain's traffic and email go - which is why pointing your nameservers at the right DNS provider is the single most important setup step.
Define: nameserver is a server that publishes the authoritative DNS records for one or more domains. A domain normally lists at least two for redundancy.
Glue records: the chicken-and-egg fix
If your nameserver is inside the domain it serves (e.g. ns1.example.com serving example.com), DNS would loop forever trying to resolve the nameserver's own address. A glue record breaks the loop: the parent registry stores the nameserver's IP directly, so resolvers get the address without another lookup. You only need glue when you run vanity nameservers on your own domain.
The DNS records you will actually use
| Record | Purpose | Example value |
|---|---|---|
| A | Name -> IPv4 address | 93.184.216.34 |
| AAAA | Name -> IPv6 address | 2606:2800:220:1::1 |
| CNAME | Alias one name to another | www -> example.com |
| MX | Mail server for the domain | 10 mail.example.com |
| TXT | Free-form text (SPF, DKIM, verification) | v=spf1 include:... |
| NS | Delegates a zone to nameservers | ns1.example-dns.com |
| CAA | Which CAs may issue TLS certs | 0 issue "letsencrypt.org" |
- A / AAAA are the workhorses - they put a name on the map.
- CNAME cannot sit at the bare/root domain (
example.com); use it for subdomains likewwworblog. - MX decides email delivery and is independent of where the website lives.
- TXT quietly powers email authentication (SPF, DKIM, DMARC) and domain-ownership checks.
TTL and propagation: why changes are not instant
Every record carries a TTL (time to live) - how many seconds resolvers may cache it. Change an A record and old resolvers keep serving the stale value until its TTL expires. This cache-expiry lag is what people call propagation; it is not the change "spreading" but old caches timing out.
Tip: lower a record's TTL (e.g. to 300 seconds) a day before a planned migration, then raise it back afterward. Nameserver (NS) changes at the registry can take longer because TLD-level caches use longer TTLs.
Putting it together
To launch a domain you typically: (1) set the domain's nameservers to your DNS provider, (2) add an A/AAAA record for the root and a CNAME for www, (3) add MX + TXT records if you use email, and (4) wait out the TTL. With OSIR you manage all of this per-domain in the dashboard or programmatically through the API and MCP tools - the same DNS record operations an AI assistant can run for you.
DNS and nameservers FAQ
What is the difference between DNS and a nameserver?
DNS is the whole naming system; a nameserver is one server within it that holds the authoritative records for specific domains. DNS is the protocol and hierarchy; nameservers are the machines that answer at the bottom of that hierarchy.
How do I find a nameserver's IP address?
A nameserver is named by a hostname (e.g. ns1.example-dns.com); its IP comes from a normal A/AAAA lookup of that hostname. When the nameserver lives under the domain it serves, the registry publishes its IP as a glue record so resolvers can reach it directly.
What is a glue record?
A glue record is an IP address for a nameserver, stored at the parent registry, used to avoid a circular lookup when a domain's nameserver is a subdomain of that same domain. It is only needed for vanity nameservers.
Why do DNS changes take time to appear?
Resolvers cache records for the duration of each record's TTL. After a change, caches keep serving the old value until the TTL expires - so the delay you see ("propagation") is really cache expiry, not the change travelling across the internet.
Which DNS record points my domain to a website?
An A record (IPv4) or AAAA record (IPv6) maps the name to the server's IP address. For a subdomain like www, a CNAME pointing to the root domain is common.
Manage DNS the AI-native way
Every domain at OSIR comes with anycast DNS and full record management - A, AAAA, CNAME, MX, TXT, NS and more - from one dashboard or via API and MCP automation, so an AI agent can create and update records for you. Browse the extensions directory and pricing to register a name. New here? See Domain Registries Explained and the Domain Lifecycle.
Image generated with AI (Higgsfield).