What Is DNS? How DNS Records Work
What is DNS and how does it work? A, CNAME, MX, TXT and NS records, TTL and propagation, pointing your domain at a server and fixing common DNS errors.

Contents
DNS (Domain Name System) is the system that turns domain names like yourcompany.com into the IP addresses computers use, like 203.0.113.10. Think of it as the internet's phone book: you look up a name, and DNS gives you the number. So what is DNS in practice? Its records decide which server your website opens on, where your email goes and how ownership of your domain is verified.
This guide explains how DNS works, the record types you will use most, TTL and propagation, how to point your domain at a server and how to fix common errors.
How does DNS work?
When you type yourcompany.com into your browser, this happens behind the scenes:
- Your computer first checks its own cache. If you visited the address recently, the answer is already there.
- If not, it asks a resolver. That is usually your internet provider's DNS server or a public one such as 1.1.1.1 or 8.8.8.8.
- If the resolver doesn't know the answer, it asks the root servers, then the servers for the extension such as
.com. They point to the domain's authoritative nameservers. - The authoritative nameserver holds the domain's records and gives the definitive answer: "yourcompany.com is at 203.0.113.10."
- The resolver caches that answer for the record's TTL and passes it on to your computer.
The whole chain usually takes milliseconds, and thanks to caching most lookups end at the first two steps.
The most common DNS records
| Record | What it does | Example |
|---|---|---|
| A | Points a name to an IPv4 address | yourcompany.com → 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | yourcompany.com → 2001:db8::10 |
| CNAME | Points a name to another name | www.yourcompany.com → yourcompany.com |
| MX | The server that receives the domain's email | yourcompany.com → mail.provider.com (priority 10) |
| TXT | Text data; SPF, DKIM, DMARC and verification records | v=spf1 include:... ~all |
| NS | Which nameservers manage the domain's DNS | ns1.provider.com |
| CAA | Which certificate authorities may issue SSL | 0 issue "letsencrypt.org" |
There is also the PTR record, the reverse DNS record that says which name an IP address belongs to. It is controlled by the owner of the IP address, not the domain, and it matters most for servers that send email.
A vs CNAME
An A record points straight to an IP address. A CNAME points one name to another; the resolver first looks up that name, then its IP. The advantage of a CNAME is that you don't need to update your record when the target's IP changes.
One rule matters: you can't put a CNAME on the root of your domain (yourcompany.com). Use A and AAAA records at the root; CNAMEs are fine for subdomains like www.
MX records and priority
A domain can have several MX records. Each has a priority, and the lowest number is tried first. If the server with priority 10 can't be reached, the one with priority 20 is tried. When you switch email providers, remember to delete the old MX records; otherwise some of your email keeps going to the old server.
TTL and propagation
TTL (Time To Live) is how long, in seconds, a DNS answer may be cached. A record with a TTL of 3600 stays in resolvers' caches for an hour.
That is what "DNS propagation" really means: the moment you change a record, the authoritative nameserver gives the new answer, but resolvers around the world keep using the old one until their cached copy expires.
If you are planning a move, this trick makes it painless:
- A day before the move, lower the record's TTL to something like 300 seconds (5 minutes).
- Once the old TTL has passed, point the record at the new IP. The change reaches everyone within minutes.
- When the move is done, raise the TTL back to something like 3600.
Nameserver changes are slower. A domain's nameservers are stored at the registry for the extension, such as .com, so the change can take 24–48 hours to reach everyone.
Pointing your domain at a server
There are two ways:
1. Change the nameservers. At your domain registrar, replace the nameservers with the ones your hosting provider gives you. From then on you manage all DNS records at your hosting provider. On web hosting this is the easiest route, because cPanel and DirectAdmin create the records you need automatically.
2. Add records only. Leave DNS management where it is and add just the records you need. For a site on your own VPS, this is usually enough:
yourcompany.com. A 203.0.113.10
www.yourcompany.com. CNAME yourcompany.com.
A warning about changing nameservers: if you don't recreate all the records from the old provider at the new one, especially MX and TXT records, your email and verification records stop working.
Checking DNS records
You can check how a record looks to the world from the command line:
nslookup yourcompany.com
On Linux and macOS, dig gives more detail:
dig yourcompany.com A
dig yourcompany.com MX
dig yourcompany.com TXT
To ask a specific resolver, use dig @1.1.1.1 yourcompany.com. To clear your own computer's cache on Windows, run ipconfig /flushdns.
Common DNS errors
- The site opens on the old server: caches haven't refreshed yet. Wait for the TTL or check with a different resolver.
- www works but the root doesn't (or the other way round): an A record at the root or a CNAME for
wwwis missing. - Email stops arriving after a nameserver change: the MX records weren't recreated at the new provider.
- A CNAME next to another record with the same name: a name with a CNAME can't hold any other record. Delete the conflicting one.
- An SSL certificate can't be issued: the domain doesn't point to the server yet, or a CAA record blocks the certificate authority. Our guide What is an SSL certificate? explains how SSL works.
For the SPF, DKIM and DMARC records on the email side, see SPF, DKIM and DMARC explained.
Connecting your domain at Nodesty
On Nodesty web hosting, once your domain points to us, cPanel or DirectAdmin creates the DNS records you need and you can enable a free SSL certificate. If you prefer to run your own server, on our AMD Ryzen 9 9950X VPS plans a single A record pointing your domain at the server's IP is all you need.
Frequently Asked Questions
How long does a DNS change take to propagate?
Most record changes show up once the record's TTL expires, usually within minutes to a few hours. Nameserver changes also involve the registry for the domain extension and can take 24–48 hours.
What is the difference between changing nameservers and adding a record?
Changing nameservers moves all DNS management for your domain to a new provider, and you need to recreate your records there. Adding a record leaves management where it is and only changes where that one record points.
Can I add a CNAME record to the root of my domain?
Not in standard DNS. The root (yourcompany.com) already has NS and SOA records, so it can't hold a CNAME; use A and AAAA records there. Some DNS providers offer workarounds such as ALIAS records or CNAME flattening.
My DNS record is correct but the site still shows the old server. Why?
Your computer, browser or internet provider is most likely still caching the old answer. Wait for the TTL to expire, clear your local cache with ipconfig /flushdns on Windows, or check with a different DNS resolver.
Where do I change a reverse DNS (PTR) record?
A PTR record belongs to the owner of the IP address, not the domain. So you set it in the panel of the provider that gave you the IP, or through their support team, not at your domain registrar. It matters most for servers that send email.
Which DNS record points my website at my server?
For the root of your domain, add an A record with your server's IPv4 address, plus an AAAA record if you use IPv6. For www, a CNAME pointing to the root is the usual choice.
About the author
Nodesty Team · Infrastructure & Support
The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.
Related articles

What Is a Subdomain and How Do You Create One?
What is a subdomain and how do you create one? Subdomains with DNS records, creating one in cPanel and DirectAdmin, pointing it to a game server, and SSL.

What Is Bandwidth and Traffic? Calculate Your Needs
What is bandwidth, and how does it differ from traffic? Mbps vs. MB/s, port speed, unlimited traffic, sizing for websites and game servers, and monitoring.

How to Change the PHP Version and php.ini Settings
How to change PHP version: choosing a version in cPanel and DirectAdmin, upgrading safely, and php.ini settings like memory_limit and upload_max_filesize.