DNS Explained: How It Works and How to Manage Records

Illustration of DNS mapping a domain name to a server address through routing signposts.

DNS — the Domain Name System — is the internet's phonebook. It translates human-friendly domain names like example.com into the numeric IP addresses computers use to find each other. When you type a web address, DNS quietly looks up the matching server behind the scenes so your browser can load the site in a fraction of a second.

Key takeaways

  • DNS turns names into numbers. People remember example.com; computers connect using an IP address like 93.184.216.34. DNS is the lookup service in between.
  • A DNS lookup passes through several servers — a resolver, a root server, a top-level domain (TLD) server, and your domain's authoritative nameserver — but it all happens almost instantly.
  • DNS records are the settings you edit. The most common is the A record, which points your domain to a server's IP address; others handle email, aliases, and verification.
  • You manage records in a DNS zone editor at your domain registrar or web host — choosing the record type, the name, the value, and a TTL (how long the record is cached).
  • Changes are not instant. Because results are cached, an edit can take a few minutes to 24–48 hours to be seen everywhere. This delay is called propagation.

What DNS is

Every device on the internet finds every other device using a number called an IP address — short for Internet Protocol address. It is the internet's version of a street address: a unique label like 93.184.216.34 that identifies one specific server. Computers are happy with numbers, but people are not. Nobody wants to type a string of digits to reach a website, and those numbers can change over time. So we use easy names instead — example.com, yoursite.com — and we need a system that turns those names into the numbers machines actually use.

That system is DNS, the Domain Name System. The simplest way to picture it is as the internet's phonebook. In an old phonebook you looked up a person's name to find their phone number; with DNS, your computer looks up a domain name to find the matching IP address. You deal with the friendly name, DNS handles the number, and the two stay linked behind the scenes. Every time you open a website, send an email, or use an app, a DNS lookup is happening quietly in the background.

DNS matters for anyone running a website because it is the connection between your domain name — the address people type — and your web hosting — the server where your site's files actually live. When you set up a site, you are really telling DNS, "when someone asks for my domain, send them to this server." Get that link right and your site loads; get it wrong and visitors see nothing, even though your files are safely in place. If the difference between a domain and hosting is still fuzzy, our guide to a domain versus hosting explains how the two fit together, and what web hosting is covers the server side in plain English.

One more thing worth saying up front: DNS is not a single computer in one place. It is a huge, shared network of servers spread across the world, all cooperating to answer lookups quickly and to keep working even if parts of it fail. That design is why the web keeps running so reliably — and it is also why, as you will see later, a change you make can take a little while to reach everyone.

How DNS works, step by step

Let's follow a single visit from start to finish. Say you type example.com into your browser and press enter. In the time it takes the page to appear, DNS has already run a small relay race behind the scenes to find the right server. Here is how DNS resolves a domain, step by step.

  1. You type a domain into your browser. You enter a web address such as example.com and hit enter. Your browser needs the site's IP address to connect, but all it has so far is the name — so it starts a DNS lookup to find the number.
  2. Your computer asks a DNS resolver. The request goes to a DNS resolver, the middleman that does the legwork of finding the answer. This is usually run by your internet provider (ISP), or a public one you can choose, such as Google's at 8.8.8.8 or Cloudflare's at 1.1.1.1.
  3. The resolver asks a root server. If the resolver does not already know the answer, it starts at the top. It asks a root server, which does not know the exact IP but does know where to send the next question — in this case, to the servers in charge of .com addresses.
  4. The resolver asks the TLD server. Next the resolver asks the top-level domain (TLD) server for .com. The TLD server still does not have the final IP, but it knows which servers are officially responsible for example.com and points the resolver to them.
  5. The resolver asks the domain's authoritative nameserver. Now the resolver contacts the authoritative nameserver for the domain — the server that holds the real, official records for example.com. This is the source of truth, set up by whoever manages the domain.
  6. The nameserver returns the IP address. The authoritative nameserver looks in its records, finds the A record for the domain, and sends back the matching IP address — for example 93.184.216.34. The resolver passes that answer back to your computer.
  7. Your browser connects to that server and loads the site. With the IP address in hand, your browser opens a connection straight to that server, requests the page, and the server sends your site's files back to be drawn on screen. The whole journey usually takes only a fraction of a second.

Results are cached to speed things up. At almost every stage of that journey, the answer is saved (cached) for a while so it does not have to be looked up again. Your browser, your computer, and the resolver all keep a copy for a set time, so the second visit to a site skips most of the relay race and connects almost instantly. Caching is what makes DNS feel effortless — and, as we will see, it is also the reason changes take a little time to appear.

The key DNS concepts to know

The step-by-step journey above uses a handful of terms that come up again and again when you manage a website. Here they are in plain English, so the rest of this guide — and your host's control panel — makes sense.

  • Nameservers are the servers that hold the official DNS records for your domain. They are your domain's "authoritative" source, and you point your domain at them at your registrar (the company where you bought the domain). When you move a site to a new host, one common way to connect it is to change your nameservers to the ones your host gives you — from then on, that host controls your DNS.
  • A DNS resolver is the service that does the lookup work on your behalf, asking each server in turn until it finds the IP address. It is usually run by your ISP, though you can switch to a public resolver such as 8.8.8.8 or 1.1.1.1 if you prefer.
  • Root, TLD, and authoritative servers are the three tiers a lookup travels through. The root server is the top of the tree and points to the right TLD. The TLD server handles an ending like .com, .org, or .co.uk and points to the domain's nameservers. The authoritative nameserver holds the actual records and gives the final answer.
  • DNS cache is the stored copy of a lookup result. Your browser, your operating system, and the resolver each keep recent answers so repeat visits are fast. When people say to "flush your DNS," they mean clearing this saved copy so a fresh lookup happens.
  • TTL (Time To Live) is a number set on each record that says how long — in seconds — a resolver may cache that answer before checking again. A TTL of 3600 means one hour; 300 means five minutes. A low TTL means changes spread quickly but slightly more lookups happen; a high TTL means fewer lookups but slower updates.

If you remember only two of these, make them nameservers and TTL. Nameservers decide who answers for your domain, and TTL decides how long the answer sticks around before the internet asks again. Almost every DNS task you will ever do comes back to one of those two ideas.

The DNS record types

Inside your domain's DNS lives a list of records — individual instructions that each do one job, such as "send the website here" or "send email there." You do not need to memorize them, but knowing what each does makes editing your DNS far less intimidating. Here are the record types you will actually meet, and what each one is for.

RecordWhat it does, in one line
APoints a domain to an IPv4 address — the classic "this domain lives at this server" record.
AAAAPoints a domain to an IPv6 address, the newer, longer style of IP address.
CNAMEMakes one name an alias of another name, so it follows wherever that other name points (often used for www).
MXSets the mail servers that receive email for your domain, and in what priority order.
TXTHolds free-form text used for things like SPF, DKIM, and verifying you own the domain for a service.
NSLists the nameservers that are authoritative for the domain — the servers that answer for it.
CAASpecifies which certificate authorities are allowed to issue SSL/TLS certificates for your domain.
SRVPoints to the server and port for a specific service, such as chat or voice apps that need one.

The two you will touch most often are the A record and, if you use custom email, the MX records. The A record is what connects your domain to your hosting, so it is the one to get right first. The CNAME is the next most common — it is how a www.yoursite.com or a subdomain is made to follow your main site without repeating the IP address. The rest tend to be set once, often automatically by your host or email provider, and then left alone.

A quick way to remember them: A and AAAA point to servers (websites), MX points to mail, CNAME points to another name, and TXT, NS, CAA, and SRV are settings and proof that keep everything else working correctly.

How to edit DNS records

You edit DNS in a DNS zone editor — a page in the control panel of whoever manages your domain's records. That is usually your domain registrar (where you bought the domain) or your web host (if you pointed your nameservers at them). Look for a section called "DNS," "DNS Zone Editor," "Advanced DNS," or "Manage DNS." Every editor looks a little different, but they all ask for the same four things when you add or change a record.

  • Type. Pick the kind of record from the list above — A, CNAME, MX, TXT, and so on. This tells DNS what job the record does.
  • Name (or host). The part of your domain the record applies to. Use @ for the domain itself (yoursite.com), or a word like www or blog for a subdomain (blog.yoursite.com).
  • Value (or points to). The destination — an IP address for an A record, another domain name for a CNAME, a mail server for an MX record, or the text string for a TXT record.
  • TTL. How long the record may be cached, in seconds. The default is usually fine; lower it before a planned change so the update spreads faster.

The most common real task is connecting a domain to your hosting, and there are two standard ways to do it. The first is to point the A record at your host's server IP address: you edit the A record for @ and set its value to the IP your host gives you. The second is to change your nameservers at your registrar to the ones your host provides, which hands your whole DNS over to the host, and your host then sets the A record for you. Both work; hosts usually recommend the nameserver method for beginners because it is set-and-forget. Our guides to a domain versus hosting and what web hosting is walk through this link in more detail.

Before you change anything, write down what is there now. Take a screenshot or copy the existing records into a note. If a change causes a problem, you can restore the old values in seconds instead of trying to remember what they were.

DNS propagation: why changes aren't instant

You save a DNS change, refresh your site, and... nothing looks different. This is normal, and it has a name: DNS propagation. It is the waiting period while your update spreads out across the internet's many resolvers and caches. Until that finishes, some people see the new setting and others still see the old one, depending on which cached copy their resolver is holding.

The reason comes straight back to the two ideas from earlier: caching and TTL. Resolvers all over the world saved your old record and were told, by its TTL, how long they may keep it before checking again. Until each of those cached copies expires, that resolver keeps handing out the old answer. A record with a one-hour TTL can linger for up to an hour after you change it; a longer TTL lingers longer. Because different resolvers cached the record at different moments, the change appears gradually rather than all at once.

In practice, many changes are visible within minutes, but you should allow up to 24 to 48 hours for a change to be seen everywhere, especially a nameserver change. The best thing you can do is simply wait — resist the urge to keep editing the record, which only resets the clock. If you want to watch the progress or speed up what you see, our step-by-step guide on how to flush your DNS and check propagation shows how to clear your own cache and use a lookup tool to confirm when the new record has gone live.

Plan ahead with TTL. If you know a change is coming — moving hosts, say — lower the record's TTL to something small like 300 (five minutes) a day or two before the switch. That way, when you make the real change, resolvers are only holding short-lived copies and the new record spreads almost immediately.

Common DNS problems

When a website will not load, DNS is one of the first things worth checking, because a small records mistake can take a whole site offline while the files themselves are perfectly fine. These are the DNS issues that trip people up most often.

  • The site won't resolve (NXDOMAIN). "Resolve" means turn the name into an IP address, so a site that "won't resolve" is one DNS cannot find an answer for. Browsers often show this as an NXDOMAIN error, which literally means "no such domain." It usually points to a missing or wrong record, or nameservers that were never set. Our fix-it walkthrough for the DNS_PROBE_FINISHED_NXDOMAIN error takes you through the checks one at a time.
  • A wrong record. If the A record points to an old or incorrect IP address, visitors reach the wrong place — or a blank page. A single mistyped digit in an IP is enough to break things. This is why keeping a note of the correct values matters.
  • Forgetting to update nameservers. A classic when moving hosts: you set everything up on the new host, but your domain's nameservers still point at the old one, so the old (or empty) site keeps showing. Updating the nameservers at your registrar is the step that actually flips your domain to the new host.

The reassuring news is that DNS problems are almost always fixable, and usually quickly. Once you have corrected the record or the nameservers, the main thing left to do is wait for propagation to catch up. If a change looks right but the old version still shows for you, that is a caching issue on your side — clearing your own DNS cache, again covered in our flush DNS and check propagation guide, usually sorts it.

Common mistakes to avoid

Editing DNS is powerful — one careless change can take your whole site or email offline. Before you touch anything, record the current records (a screenshot is enough), change one thing at a time, and double-check the value you type. If a record controls email (MX) or verification (TXT), deleting it can silently stop your mail or break a connected service, so be sure you know what a record does before you remove it.

Most DNS trouble comes from a few avoidable slips. Watch out for these in particular:

  • Editing the wrong record. Zone editors list several records that can look similar. Changing the A record for a subdomain when you meant the main domain — or the other way round — is a common mix-up. Check the Name/host field carefully before you save.
  • Setting a very high TTL right before a planned change. A long TTL, like 86400 (24 hours), means resolvers hold your record for a full day. Set that just before you move hosts and your change will crawl out slowly. Lower the TTL ahead of any planned change, not after.
  • Deleting records you still need. Clearing out records that "look unfamiliar" can remove your email routing (MX), a service verification (TXT), or an alias (CNAME) that something depends on. If you are not sure what a record is for, leave it — or note it down before removing it so you can put it back.

None of these are hard to avoid. Slow down, change one record at a time, keep a copy of the originals, and give each change time to propagate before you decide it did not work. That patience is what separates a smooth DNS edit from a stressful afternoon.

Frequently asked questions

What is DNS in simple terms?

DNS, the Domain Name System, is the internet's phonebook. It translates the human-friendly domain names people type, such as example.com, into the numeric IP addresses that computers use to find each other, like 93.184.216.34. You deal with the easy name and DNS handles the number behind the scenes. Every time you open a website, send email, or use an app, a DNS lookup is quietly finding the right server for you.

How does DNS work?

When you type a domain, your computer asks a DNS resolver to find its IP address. If the resolver does not already have the answer cached, it asks a root server, which points it to the TLD server for the ending like .com, which points it to the domain's authoritative nameserver. That nameserver returns the IP address, the resolver passes it back, and your browser connects to that server and loads the site — all in a fraction of a second.

What are the main DNS record types?

The most common are the A record (points a domain to an IPv4 address), AAAA (to an IPv6 address), CNAME (makes one name an alias of another), and MX (sets the mail servers for your email). You will also see TXT records (text used for SPF, DKIM, and domain verification), NS records (your nameservers), CAA records (which authorities may issue SSL certificates), and SRV records (for specific services). The A record is the one that connects your domain to your hosting.

What is a nameserver?

A nameserver is a server that holds the official DNS records for your domain and answers lookups about it — it is your domain's authoritative source. You point your domain at its nameservers at your registrar, the company where you bought the domain. When you move to a new web host, one common way to connect your site is to change your nameservers to the ones the host provides, which hands control of your DNS to that host.

Why do DNS changes take so long?

Because of caching and TTL. Resolvers around the world save (cache) your DNS records so lookups stay fast, and each record has a TTL — a time that tells resolvers how long they may keep the cached copy before checking again. Until those copies expire, resolvers keep giving out the old answer, so a change spreads gradually. Most updates appear within minutes, but you should allow up to 24 to 48 hours for a change to be seen everywhere.

How do I connect my domain to my hosting with DNS?

There are two standard ways. You can point your A record at your host's server IP address in your DNS zone editor, setting the record for @ to the IP the host gives you. Or you can change your nameservers at your registrar to the ones your host provides, which lets the host manage all your DNS for you. Beginners are usually steered toward the nameserver method because it is simpler and set-and-forget. Either way, allow time for propagation.

What is DNS propagation?

DNS propagation is the waiting period after you change a record while the update spreads across the internet's resolvers and caches. During that time, some people see the new setting and others still see the old cached one. How long it takes depends on the record's TTL and where visitors are. Many changes show within minutes, but a full update — especially a nameserver change — can take up to 24 to 48 hours to reach everyone.

Summary

DNS, the Domain Name System, is the internet's phonebook: it turns the domain names people type into the IP addresses computers use, so your browser can find the right server and load a site in a fraction of a second. A lookup travels from your computer to a resolver, then through a root server, a TLD server, and your domain's authoritative nameserver before the IP comes back — with answers cached along the way to keep it fast. You manage all this through DNS records in a zone editor, where the A record connects your domain to your hosting, MX handles email, and CNAME, TXT, NS, CAA, and SRV cover aliases, verification, and services. Just remember that caching and TTL mean changes are not instant — allow up to 24 to 48 hours to propagate, and avoid the common slips of editing the wrong record, setting a high TTL before a change, or deleting records you still need. Ready to put it into practice? Your next step is our hands-on guide to flushing your DNS and checking propagation, so you can confirm a change has gone live.

References

  • ICANN — how the Domain Name System resolves domain names to IP addresses, and the role of registrars and nameservers.
  • Internet Engineering Task Force (IETF) — the DNS specifications, including record types (A, AAAA, CNAME, MX, TXT, NS, CAA, SRV) and TTL/caching behavior.
  • IANA — the DNS root zone and the hierarchy of root, top-level domain, and authoritative nameservers.
  • Public DNS resolver documentation (Google Public DNS at 8.8.8.8 and Cloudflare at 1.1.1.1) — how resolvers cache and return lookups.
Bitrich777 Hosting Team
About the author

The editorial team behind the Bitrich777 Hosting Help Center — practical, tested guides on web hosting, WordPress, servers, DNS, SSL, email, security and migration. Every walkthrough is reproduced on a live host before it is published.

Spotted an error? Tell us