What Are DNS Records? A, CNAME, MX, and TXT Explained
Updated 17 October 2026
Jump to section
DNS records are the individual instructions that tell the internet where your website and email live. An A record points your domain at the server hosting the site, an MX record routes your email, and a TXT record carries notes such as email-security settings. Cloudflare calls them "instructions that live in authoritative DNS servers". They sit one level below DNS itself, the system that looks them up.
What a DNS record is made of
A DNS record is a single line in your domain's settings that maps one thing to another. A domain usually has several, each handling a different service.
Every record has a few parts. There is the name it applies to, the type of record, the value it points to, and a TTL.
The TTL, or time to live, is how long other servers cache the record before checking again. A low TTL makes changes take effect faster; a high one makes them linger.
The records you actually deal with
Most businesses only ever touch four or five record types. This table gives each one, based on Cloudflare's definitions, with an illustrative value.
| Record | What it does | Example value |
|---|---|---|
| A | Holds the IPv4 address of your site | 203.0.113.10 |
| AAAA | Holds the IPv6 address of your site | 2001:db8::10 |
| CNAME | Points one name to another name | www points to your root domain |
| MX | Directs mail to an email server | your mail provider's server |
| TXT | Stores text notes, often for email security | SPF and verification records |
| NS | Names the nameservers for the domain | ns1.example.com |
Source: DNS records overview, Cloudflare. Example values are illustrative.
The A record is the one most people picture. It maps your domain to the IP address of the server hosting the site, so it is what makes the website load.
CNAME records point one name at another instead of at an address. The common use is sending www.yourdomain.com to your root domain, so both reach the same place. Cloudflare notes a CNAME "does NOT provide an IP address" of its own, which is why it always points to another name.
Why your website and email use different records
Your website and your email are pointed by separate records, and this trips people up. The A record sends visitors to your web server, while the MX record sends mail to your email provider, which is often a different company entirely.
That separation is useful. You can host your site with one provider and run business email through Google Workspace or Microsoft 365, because each is directed by its own record.
It also explains a common outage. A change to the MX record can stop email while the website loads perfectly, since the record that moved has nothing to do with the site.
A pattern we see is a business that cannot say who holds its domain or DNS login, which only surfaces when a record needs changing in a hurry. Knowing where your records live before that day saves the scramble.
TXT records quietly carry your trust
TXT records store short text notes, and today they do a lot of security work. Cloudflare describes them as a place to "store text notes," adding that "these records are often used for email security."
The main job is stopping others from faking email from your domain. The SPF, DKIM, and DMARC entries all live in TXT records, and together they tell receiving mail servers which senders are genuinely you.
TXT records also handle domain verification, the step where a service like Google asks you to add a record to prove you own the domain.
Editing records without breaking things
Editing a DNS record is powerful, and one wrong value can take a service offline. The safest habit is to change one record at a time and confirm it worked before moving on.
Changes are not instant. Each record's TTL means the old value can linger in caches until its TTL runs out, a delay often called propagation, though nothing is really pushed anywhere.
Lower a record's TTL a day or two before a planned change, and at least as far ahead as its current TTL. The switch then takes effect faster. It is the one preparation that saves the most stress during a move.
Frequently asked questions
What is the difference between an A record and a CNAME?
An A record points a name directly at an IP address, while a CNAME points a name at another name. You use an A record to send your root domain to your server's real address. You use a CNAME to make an alias like www follow whatever the main name does. A CNAME holds no IP of its own, so it always resolves through the name it points to.
Which DNS record controls my email?
The MX record. It directs incoming mail to your email provider's servers. That is why it usually points to Google Workspace, Microsoft 365, or your host's mail service, not your website. Because email and the website use different records, editing or deleting the MX record can stop mail while the site stays online, so treat it carefully.
Why do my DNS changes take so long to show up?
Because each record has a TTL that tells other servers how long to cache the old value. Until that cache expires, some visitors and mail servers still see the previous record. A changed record usually settles within its TTL, often minutes to a day. A nameserver change can take longer: Namecheap notes it "may take up to 24-48 hours". Lowering the TTL before a planned change shortens the wait.
Can a wrong DNS record take down my whole site?
Yes. A mistaken or deleted A record can make the website unreachable, and a bad MX record can stop email, even though the server and files are perfectly fine. This is why DNS problems often look like a total outage, and why changing records one at a time, with a note of the original values, matters so much.
Where do I edit my DNS records?
Wherever your nameservers point, which is usually your domain registrar, your host, or a separate DNS provider such as Cloudflare. You log into that account and edit the records in its DNS or zone-file section. If you are not sure which account holds them, that is worth finding out before you ever need to make an urgent change.
Keeping your records legible
Storming Solutions builds custom-coded websites and maintains existing WordPress sites for Malaysian businesses, and setting DNS records up cleanly is part of the foundation we hand over. We keep a clear record of what points where, in accounts registered in the client's name, so an edit is never a guessing game.
Not sure what your records say, or facing an outage you cannot place? Message us on WhatsApp or start with how DNS works. Our web development work sets the records up correctly, in your name, so your site and email both stay reachable.