Web Design

DNS Records Explained: What A, CNAME, MX, TXT and NS Records Do, and Which Ones Not to Touch

When a web host or email provider says "add these records to your DNS", it helps to know what you are changing. This guide explains the records a small business meets, in plain English, using Cloudflare's learning pages and documentation read on 8 November 2026, and ends with a safe way to edit them.

DNS Records Explained: What A, CNAME, MX, TXT and NS Records Do, and Which Ones Not to Touch

Key takeaways

  • A DNS record is an instruction about your domain. Cloudflare calls DNS records instructions held on authoritative DNS servers that say what IP address a domain uses and how to handle requests for it.
  • A and AAAA records point a name at an address. A holds an IPv4 address, AAAA an IPv6 one.
  • A CNAME points a name at another name. It never holds an IP address, and no other record can share its name.
  • MX records send your email. Break them and mail can stop arriving.
  • TXT records prove and protect. They carry domain ownership checks and email security records such as SPF, DKIM and DMARC.
  • NS records say who answers for your domain. Changing them moves all your DNS.
  • Every record has a TTL. It sets how long other servers keep the answer.
  • Copy before you change. Save a list of all current records before editing any of them.

The short answer

A DNS record is one line in your domain's address book. The common ones are: A and AAAA (where the website lives), CNAME (this name is an alias for that name), MX (where email goes), TXT (notes that prove ownership and protect your email), and NS (which servers hold all these records). Most small business sites need only a handful. The records to treat with the most care are MX and anything your email provider gave you, because a mistake there can stop your mail.

Who is writing: Amariq builds and launches websites and has moved its own site's DNS (see what we learned moving Amariq). The definitions below are Cloudflare's, not our own tests. Where a hosting platform gives you exact values, use those, not the examples here.

What ranks for this search, and what it leaves out

On 8 November 2026 the first page of Google (US, English) for "what is a dns record" was led by Cloudflare's learning centre, followed by IBM, Barracuda, a DEV Community post (1 April 2023), a DNS Checker lookup tool and Reddit threads. Images came from PowerDMARC, Wikipedia and ThousandEyes. Google's snippet describes DNS records as instructions that live in authoritative servers and say what IP address a domain uses.

These pages define the record types well. They are written for people who already run servers. A small business owner usually arrives with a different question: my host sent me three lines to paste in, which of my existing records can I leave alone, and what could I break? That is the gap this guide fills, by pairing each record with what it does for a business and how much care it needs.

The records, in plain English

RecordWhat it doesExample of what you might seeCare needed
APoints a name to an IPv4 addressThe website at your host's addressMedium
AAAAPoints a name to an IPv6 addressThe same, in the newer formatMedium
CNAMEMakes one name an alias of another namewww pointing to your host's nameMedium
MXDirects email to a mail serverYour email provider's mail serversHigh
TXTStores text, used for ownership checks and email securitySPF, DKIM, DMARC, a verification codeMedium to high
NSNames the servers that hold your DNSYour DNS provider's nameserversHigh
SOAHolds admin details about the domainUsually managed for youLow, leave alone

The care column is our own judgement. The list follows Cloudflare's list of the most common records, which also includes SRV (a port for specific services) and PTR (reverse lookups). Cloudflare lists many rarer types too, such as CAA, which says which certificate authorities may issue certificates for a domain, and DNSKEY, which supports DNSSEC.

A and AAAA: where your website lives

Cloudflare's documentation says A and AAAA records map a domain name to one or more IPv4 or IPv6 addresses, and that at least one IP-address record is required for each domain on Cloudflare. The name can be a subdomain, such as www, or the zone apex, written @, meaning the bare domain like example.com. When your host says "point your domain to this IP address", it means an A record.

CNAME: an alias

Cloudflare's CNAME page describes it as pointing from an alias domain to a "canonical" domain, used instead of an A record when a name is an alias of another name. A CNAME must point to a domain, never to an IP address. Two rules matter in practice:

  1. No other record can have the same name. If blog.example.com has a CNAME, it cannot also have an MX or TXT record. Cloudflare notes one exception, flattening, where the CNAME acts like an A record, and even then other records are still not allowed on that name.
  2. Avoid chains. A CNAME can point to another CNAME, but Cloudflare says that adds lookups and slows loading, and recommends pointing straight at the final name.

Cloudflare also corrects a common misunderstanding: a CNAME sends visitors to the same address as the target, but the web server still looks at which name was asked for and can show a different page.

MX: where email goes

An MX (mail exchange) record directs email to a mail server. Cloudflare's example shows a priority number on each one: the lower number is preferred, so a server with 10 is tried before one with 20, and a higher number acts as a backup. Two details to remember:

  • MX records must point to a server name that has an A or AAAA record. Cloudflare says pointing an MX at a CNAME is forbidden by the standards that define MX records.
  • Your email provider tells you exactly which MX records and priorities to use. Copy them as given.

Our guide to business email cost explains how to pick a provider, and the DNS records above are what connect it to your domain.

TXT: proof and protection

A TXT record lets an administrator enter text into DNS. Cloudflare says two of the most important uses today are email spam prevention and proving you own a domain, even though TXT wasn't designed for them. A domain can have many TXT records.

UseWhat it isWhere it lives
SPFLists the servers allowed to send email from your domainA TXT record on the domain
DKIMLets receivers check that an email was signed by your domain, using a public keyA TXT record published for the domain
DMARCTells receivers what to do with mail that fails the other twoA TXT record under _dmarc.yourdomain.com
Ownership checkA code a service asks you to publish to prove you control the domainA TXT record

Cloudflare's documentation recommends these email records whether or not your domain sends mail, since they can help protect against spoofing. When a service gives you a TXT value to publish, paste it exactly, including the quotation marks if the panel asks for them.

NS: who answers for your domain

NS records name the authoritative servers for the domain. Cloudflare's documentation says you only need to add NS records in its table when you delegate a subdomain elsewhere, and that the main nameservers are set through a separate section. Changing your domain's nameservers at the registrar moves all your DNS to a different provider, which is why it is a bigger step than changing one record. Our guide to how to transfer a domain name covers the order of steps.

TTL: the timer on every record

Cloudflare says all DNS records have a TTL (time to live) that indicates how often a DNS server will refresh the record. A short TTL means a change shows up sooner. Our guide to how long DNS propagation really takes explains how to use it before a switch.

What a typical small business site has

This is a common shape, not a rule. Your own panel may differ.

NameTypePoints toJob
@A (and AAAA)Your host's addressThe bare domain loads the site
wwwCNAMEThe name your host gives youThe www version loads the site
@MXYour email provider's serversMail arrives
@TXTSPF from your mail providerMail you send is trusted
A mail-signing nameTXTThe DKIM key your provider gives youMail is signed
_dmarcTXTYour DMARC policyReceivers know what to do with fakes
VariousTXTVerification codesProves ownership to Google, a host or others

Your host's instructions may differ from this table, so follow the exact values it gives you. Our guide to Framer custom domains shows what one platform asks for.

A safe way to edit DNS records

  1. Take a screenshot or export of every record before you start.
  2. Label what each one is for. If you can't say what a record does, don't delete it.
  3. Change one thing at a time, and note what you changed and when.
  4. Never delete MX or email TXT records unless you are deliberately moving email, and have the new ones ready first.
  5. Paste values exactly. A missing character in an address, key or quotation mark can break the record.
  6. Lower the TTL before a planned change and raise it afterwards.
  7. Test afterwards: load the site on www and the bare domain, send and receive a test email, and run any verification the service offers.

Common mistakes

MistakeWhat goes wrong
A CNAME and an MX on the same nameThe CNAME rule forbids other records on that name
MX pointing at a CNAMEForbidden by the standards, per Cloudflare
Deleting old TXT records during a moveEmail authentication and verifications can fail
Changing nameservers without copying records firstCloudflare warns that automatic scans may miss records

One practical use of a CNAME record is proving you own a site; our Bing Webmaster Tools setup guide lists it as one of four ways to verify.

How Amariq can help

If you have a list of records and aren't sure which to keep, send it to us with the host or email provider you're moving to and we will mark each record as keep, change or add, and the order to do it in. Registrar logins and nameserver changes stay with you: we give you the exact values and you enter them. We build on Webflow, Framer, WordPress, Shopify, Wix, Squarespace or a custom stack. Each project is priced from its scope, never by the hour, with 40% to start, 30% at design approval and 30% before launch. Once the final payment is made, the design, copy and code belong to you, and your domain, hosting and analytics accounts sit in your name. See our web design service or the website optimization service.

Frequently asked questions

What is a DNS record?

An instruction stored on a domain's authoritative DNS servers that says what IP address the domain uses and how to handle requests for it, according to Cloudflare. Each record also has a TTL.

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

An A record maps a name to an IP address. A CNAME maps a name to another name, never to an IP address, and no other record can share its name.

Do I need DNS records for email?

Yes. An MX record directs mail to a mail server, and SPF, DKIM and DMARC TXT records help receivers trust your messages. Your email provider will give you the exact values.

Can I delete DNS records I don't recognise?

Not without checking. Some may be verification codes or email settings. Take a copy first, and remove one only when you know what it does.

What does a TXT record do?

It holds text. Today it is mostly used for email security records and proving you own a domain, per Cloudflare.

How many DNS records can a domain have?

There is no small fixed number for most purposes. Cloudflare's documentation sets limits for its own service, such as up to 10 NS records per delegation name, and a maximum size per record.

Why does a DNS change take time to show?

Because other servers keep the old answer until its TTL runs out. See our guide to DNS propagation.

Rahat Khondokar, founder of Amariq

Rahat Khondokar

Founder & CEO, Amariq

Rahat designs and builds websites for marketing teams and ecommerce brands, and writes here about the structure, copy and conversion work behind them. More about Amariq. Find him on YouTube, Dribbble and LinkedIn.

Keep reading

Related articles.

All articles

Free Website Hosting: What You Really Get, What You Lose, and Which Plans Allow a Business
Pricing·9 November 2026

Free Website Hosting: What You Get and Lose

Which free website hosting plans allow a business site, what the limits are, and where the rules say no. Checked on the makers' own pages on 9 Nov 2026.