DNS records explained: A, CNAME, MX, TXT and how to change them
What A, AAAA, CNAME, MX, TXT, NS and CAA records do, how TTL works, and a safe step-by-step routine for changing DNS without taking your site down.
DNS is the address book of the internet. Every time someone opens your site or sends you an email, their device asks DNS where to go. When a business site goes down after a "small change", or email suddenly bounces, a DNS record is usually behind it. The good news: the record types you will meet as a business owner fit on one page, and changing them safely follows a short routine.
Disclosure: some links in this guide are partner links. If you buy through them, MMIX may earn a commission; your price stays the same.
Marketing MIX has managed DNS for client websites and mail since 2012. This guide is the reference we give clients before they touch their own zone.
How DNS fits together
Your domain is registered at a registrar. The registrar tells the registry which nameservers answer for the domain. Those nameservers hold the zone: the list of records for your domain. The nameservers can belong to your registrar, your web host, or a separate DNS service such as Cloudflare.
That gives the first rule: records only work where the nameservers point. Editing a zone at your registrar does nothing if the nameservers point at Cloudflare, and the other way round. Most "I changed it and nothing happened" cases come from editing the wrong panel.
The records you will actually use
Record
What it does
Typical example
A
Points a name at an IPv4 address
@ → the IP address of your web server
AAAA
Points a name at an IPv6 address
@ → the IPv6 address of your server
CNAME
Points a name at another name
www → your host's target name
MX
Says which servers receive email for the domain, with a priority
@ → your mail provider's mail servers
TXT
Free text for verification and email security
SPF, DKIM, DMARC, Google and Microsoft verification
NS
Lists the nameservers for the zone or a subdomain
Set by your DNS provider
CAA
Lists which certificate authorities may issue SSL for the domain
Let's Encrypt, Sectigo and so on
A few details that trip people up:
The @ symbol means the root domain itself (example.com). www is a separate name and needs its own record.
MX priority: a lower number means higher preference. Your provider tells you which values to use.
TXT records can coexist, with one exception: a domain should have only one SPF record. Two SPF records make both invalid. Our SPF, DKIM and DMARC guide covers this in detail.
CAA is optional. If you add it, list every authority that issues certificates for you, or certificate renewals will fail. See the SSL certificate guide.
TTL: why changes are not instant
Every record carries a TTL (time to live) in seconds. Resolvers around the world cache your answer for that long. With a TTL of 3600, a change can take up to an hour to reach everyone; with 86400, up to a day. That is why the routine below lowers TTL before a planned change. "Propagation" is mostly this caching.
Step-by-step: changing DNS records safely
Step 1: Find where your DNS is hosted
Look up the NS records for your domain with a public tool such as MxToolbox (choose "DNS Lookup" or type ns: before the domain). The answer names the provider whose panel controls your records. If you are not sure which account that is, start there before changing anything.
If your domain is registered at Namecheap, its BasicDNS is the default, and Namecheap FreeDNS can host DNS for domains registered elsewhere. If you still need a domain, the Namecheap domain search is a quick place to start; our guide on how to buy a domain name explains what to set up on day one.
Step 2: Export or screenshot the current records
Save the whole zone before you change it. Many panels have an export button that produces a zone file. If yours does not, take screenshots of every page of records, including the TTL and priority columns. This copy is your rollback plan, and it is also the checklist you will use if you ever move DNS to another provider.
Step 3: Lower the TTL a day ahead
For a planned change, such as moving the site to a new host, set the TTL on the affected records to a short value (300 seconds is common) at least one old-TTL period before the change. If the old TTL was one day, do this a day ahead. Then, when you switch the value, the old answer expires from caches within minutes.
Step 4: Make one change at a time
Edit one record, save, and verify it before touching the next. Keep the old value in a note next to the new one. When something breaks after a batch of five edits, you do not know which one caused it; after a single edit, you do.
Typical changes:
New website host: update the A record for @ and the CNAME (or A record) for www. Our website migration guide covers the full sequence.
New email provider: replace the MX records and update the SPF TXT record, then add the provider's DKIM record.
Domain verification: add the TXT record exactly as given. Do not delete older verification records unless you know the service is no longer in use.
Step 5: Verify from outside your network
Your own computer and router cache DNS too, so test from outside. Use MxToolbox or run dig example.com A @1.1.1.1 (or nslookup example.com 8.8.8.8 on Windows) to ask a public resolver directly. Then load the site in a private window over https and send a test email from an outside account to your domain.
Step 6: Raise the TTL back and document the zone
When the new values have been stable for a day, put the TTL back to a normal value, such as 3600. Update your written record of the zone: what each entry is for, which service added it, and who to ask before removing it. That one document saves hours the next time a provider changes.
What to check and common mistakes
Editing the wrong panel. Always confirm the NS records first.
Switching nameservers without copying records. Moving DNS to Cloudflare or a new host is safe only after every MX, TXT and CNAME has been recreated there. Our Cloudflare setup guide shows how to check the imported list.
Two SPF records. Merge them into one.
A trailing dot or a duplicated domain. Some panels append the domain automatically, so www.example.com typed in the host field becomes www.example.com.example.com. Enter only www.
Deleting "unknown" TXT records. They are often verifications for Google Search Console, Microsoft 365 or a payment provider. Find out what they are first.
Forgetting the www name. The root and www need records of their own.
When to hand it off
DNS mistakes are quiet until they are expensive: lost email, an expired verification, a site that loads for some visitors and not others. If your zone has grown over years of agencies and tools, an audit is cheap insurance. We document every record, remove what is dead and set up monitoring.
Prefer to hand it off? MMIX sets up domain, hosting, email and DNS for you — since 2012. Tell us about your project and we will reply with a plan.
Send your site address. We look at the site, your ads and your search presence and send back what to fix first and a one-month plan. Ads management is quoted after the review.