Skip to content

What Is DNS? A, CNAME, MX and TXT Records Explained, and How DNS Affects Your Site and Email

On this page

Last updated: · By

In short: DNS (Domain Name System) is the system that translates a website name, like cw-servers.com, into the IP address of a server. Every time you visit a site or send an email, a computer asks DNS where to go. The answers are stored in records: A for the website, CNAME for an alias, MX for email and TXT for verification. I measured it on 7 Nov 2026: an answer from a cache came back in 5 to 19 milliseconds.

⏱ Reading time: about 8 minutes · Level: beginner · Last checked against the public DNS records of my own site: 7 Nov 2026

The short version, in numbers (measured on 7 Nov 2026 from a home connection):

What I checkedResult
Name servers of my domain (NS)Two Cloudflare servers, with a TTL of 86,400 seconds (one day)
A records of the site2 IPv4 addresses and 2 IPv6 addresses, all Cloudflare’s, with a TTL of 300 seconds
MX records for email3 records, with priorities 22, 24 and 63
Response time from 1.1.1.1 (Cloudflare)5 to 19ms for a name already in the cache, 12 to 26ms for a random subdomain that was not cached
Response time from 8.8.8.8 (Google)52 to 61ms
Who runs a country-code suffix (the .il registry as an example)The Israeli Internet Society, with 8 name servers (such as ns1.ns.il)

What is DNS, in plain words?

DNS is the phone book of the internet. Computers communicate by numbers (IP addresses), and people remember names. DNS connects the two.

The system doesn’t live in one place. It is distributed across thousands of servers around the world, and each server is responsible for a different part of the name. The structure was defined back in 1987 in RFC 1034, and it still works on the same principle today.

Three terms you will meet in every DNS panel:

  • Record: a single line in the database, for example “the website is at address X” or “email goes to server Y”.
  • Name Server (NS): the server that holds the records for your domain and answers for it.
  • TTL (Time To Live): how many seconds an answer may be kept in the cache before it has to be asked again.

How does a DNS query work, step by step?

When you type an address, the browser follows a fixed route. Most of the time it stops at the first or second step, which is why the answer arrives in milliseconds.

  1. Local cache: the browser and the operating system check whether this name was asked for recently and whether the TTL has not run out yet.
  2. Resolver: if there is no answer, the question goes to your internet provider’s server, or to a public one like Cloudflare’s 1.1.1.1 or Google’s 8.8.8.8. It also has a large cache.
  3. Root servers: if the resolver doesn’t know either, it asks the root servers. According to IANA there are 13 root server names, from a to m, and each of them is in practice a network of servers. They only answer “who is responsible for this suffix”.
  4. Suffix servers: the servers for the suffix (.com, or a country suffix like co.uk) point to the name servers of the specific domain. For example, a country suffix such as .il is managed by its national registry.
  5. The domain’s name server: it gives the final answer, for example the IP address from an A record, together with the TTL.
  6. Caching and return: the resolver keeps the answer for the length of the TTL and returns it to the browser. Only now does the browser contact the website’s server.

My measurement shows the cache at work: a name that was already in the cache of 1.1.1.1 came back in 5 to 19ms. The same question to 8.8.8.8 took 52 to 61ms from my connection. That is a measurement from one point on one evening, so treat it as an indication and not a performance test.

Which DNS records are there, and what does each one do?

There are dozens of record types, but for a business website and email, eight are enough to know. The basic record types are defined in RFC 1035, and Cloudflare collects an explanation of each type.

RecordWhat it doesA useful example
APoints a name to an IPv4 addressThe main domain points to a server on Cloudways
AAAALike A, for an IPv6 addressCreated automatically when the site is behind Cloudflare
CNAMEMakes one name an alias of another namewww points to the main domain, or to an address that Autonomous gives you
MXTells which server to deliver the domain’s email toGoogle Workspace or Microsoft 365
TXTFree text for verification and policiesSPF, DKIM, DMARC and ownership verification in Google Search Console
NSWhich name servers the domain usesMoving to Cloudflare changes the NS at the registrar
SOAAdministrative details of the zone, such as the primary serverYou usually don’t touch it
CAAWho is allowed to issue an SSL certificate for the domainLets only Let’s Encrypt issue one

What does the DNS of a real site look like?

I queried the public DNS servers about my own domain on 7 Nov 2026. These are records anyone can see, so there are no secrets in them.

  • NS: two Cloudflare name servers. That means I manage the records in Cloudflare, not at the registrar.
  • A and AAAA: Cloudflare’s addresses, not those of my Cloudways server. This is a protected (Proxied) record: the visitor contacts Cloudflare, and Cloudflare contacts the server. That way the server’s address is not exposed.
  • www: returns the same Cloudflare addresses. You don’t see a CNAME from the outside, because Cloudflare answers it directly.
  • MX: three records. The number next to each is the priority: the lowest number gets the email first.
  • TXT: one SPF record that authorizes three sending services, and two Google verification records.

What I found on my own domain, honestly: at the time of the check the domain had no DMARC record. That is exactly the mistake I warn about in the SPF, DKIM and DMARC guide, and it went onto my own fix list.

Want to check your own domain? On Windows, open a command prompt and type nslookup -type=mx example.com. On a Mac or Linux, type dig example.com MX. Replace MX with A, TXT or NS depending on what you are looking for.

What is TTL, and why doesn’t a DNS change update immediately?

TTL is the validity of an answer, in seconds. When it is 300, servers around the world can keep returning the old address for up to 5 minutes after you change it. When it is 86,400, it can take up to a day.

On my domain the site records are 300 seconds and the name servers are a full day. That is why a change to an A record is felt quickly, and a change of name servers takes longer. How to shorten the wait before a hosting move is in the guide how long DNS takes to update.

How are DNS, your website and your email related?

The website and the email use the same domain, but different records. That is why you can move the website to a new server without touching the email, and the other way around.

  • The website: an A record for the main domain and a record for www. On Cloudways, you copy the server’s IP address into the A record. Full instructions are in the guide connecting a domain to Cloudways.
  • Email: MX records that point to your email provider, and TXT records for SPF, DKIM and DMARC that keep your emails out of spam.

The most expensive mistake: you move the name servers to a new provider and forget to copy the MX records. The website works, but email stops arriving with no warning at all.

Who manages your DNS: the registrar, Cloudflare or Cloudways?

Whoever appears in the NS records is the one managing it. There are three common options for a site hosted on Cloudways:

Where the DNS isWhen it fitsWhat to know
At your registrarA simple site with few changesFree with the domain; the interface differs from registrar to registrar
Cloudflare on the free planMost business sitesFast DNS, CDN and protection for free; you change the NS at the registrar
DNS Made Easy, as a Cloudways add-onAgencies and sites that need failoverPaid per domain; the comparison is in DNS Made Easy vs Cloudflare

A site on Cloudways doesn’t require you to change DNS provider. It is enough to update an A record wherever your domain is managed today.

Black Friday80% off
80% off 2 months of managed hosting

The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Ends in—days—hours—minutes—seconds
Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator

Common DNS mistakes and how to avoid them

A CNAME on the main domain: according to the standard, a name that has a CNAME may not have other records. The main domain always has NS and SOA, so you put an A record there. Cloudflare has a workaround called CNAME Flattening.

Two SPF records: only one SPF record is allowed per domain. When you add a new sending service, merge it into the existing record.

Changing a record and expecting the result immediately: the old TTL is still valid. Check against several servers, and clear your local cache before you decide something is broken.

A browser message that the name doesn’t exist: most often it is a typo, an expired domain or name servers that were never set up. The full explanation is on the page about the DNS_PROBE_FINISHED_NXDOMAIN error.

Frequently asked questions about DNS

What is DNS in short?

DNS is a system that translates website names into the IP addresses of servers. It works like a phone book distributed across thousands of servers around the world. Without it you would have to remember numbers instead of names.

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

An A record points directly to an IP address. A CNAME record points to another name, and the lookup continues from there to an address. Use A for the main domain and CNAME for subdomains like www.

What is an MX record?

An MX record tells mail servers around the world where to send emails addressed to your domain. Each record has a priority number, and the lowest number goes first. If the record is missing or wrong, emails won’t arrive.

Which DNS server is the fastest?

There is no single answer, because it depends on your internet provider and your location. On my home connection on 7 Nov 2026, Cloudflare’s 1.1.1.1 answered in 5 to 19ms and Google’s 8.8.8.8 in 52 to 61ms. Measure from your own connection before you switch.

Does Cloudways manage the DNS of my domain?

Not by default. Cloudways gives your server an IP address, and you set an A record wherever your domain is managed: the registrar or Cloudflare. If you want managed DNS, you can add the paid DNS Made Easy add-on.

How long does a DNS change take to update?

It depends on the record’s TTL. With a TTL of 300 seconds, most visitors will see the change within minutes. A name server change can take up to a day, because their TTL is longer.

Sources: RFC 1034: Domain Names, Concepts and Facilities · RFC 1035: Implementation and Specification · IANA Root Servers · National registry (.il example): domains and DNS · Cloudflare: What is DNS · public DNS queries on my own domain, 7 Nov 2026. This guide was written and tested by Asael Dreyer · Updated: 7 Nov 2026

Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details

Picture of Asael Dreyer
Asael Dreyer

Hi, I'm Asael Dreyer, CEO of an SEO agency that runs hundreds of websites hosted on dozens of Cloudways servers.
Everything you will find here comes from hands-on experience, mine and my teams', straight from the field: from the guides to the recommendations. All to help you get the most out of Cloudways.

More about me →

Need help? Got a question about your server or this guide? Write to us and we will get back to you.

More guides on this topic:
מפריד
Thanks for your message!
We will get back to you soon.
Ready to get started?

Sign up with the coupon code ASAEL