DNS records explained: A, CNAME, MX and TXT
What DNS records are, what A, AAAA, CNAME, MX and TXT are for, how TTL works and how to change them without taking your website or your email offline.
DNS is the system that translates the name of your domain (yourcompany.com.ar) into the technical address where your website or your email lives. It is configured with DNS records: small instructions that tell the world "the site is here", "email is received over there", "this text proves the domain is mine". Almost every change of hosting, email or external tool involves touching one of them.
This guide is technical documentation for anyone who is going to edit the DNS zone of a domain. We explain the most used record types, how to read them and how to modify them without breaking anything. The general vocabulary is on MDN.
How a DNS query works, in a few lines
When someone types your address, their device asks a recursive DNS server (the one from their internet provider or a public one). If it does not have the answer stored, it asks the domain's own servers, called authoritative servers, which are the ones that hold your zone. Those authoritative servers are the ones indicated by the NS record of your domain.
That is why your records can "live" in two different places: at the provider where you registered the domain or at another service to which you delegated DNS. Records are edited wherever the NS points to, not where you bought the domain. It is the most frequent mistake: changing records in a panel that is no longer in use.
The DNS records you are going to use
| Type | What it does | Example value |
|---|---|---|
| A | Points a name to an IPv4 address | 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | 2001:db8::10 |
| CNAME | Makes one name an alias of another | site.example.com |
| MX | Says where email is received | mail.example.com (with priority) |
| TXT | Stores text: verifications, SPF, DKIM, DMARC | "v=spf1 …" |
| NS | Says which servers manage the zone | ns1.example.com |
A and AAAA
They associate a name with the IP address of the server. If your hosting gives you an IP, you enter it in an A record for the root (yourcompany.com.ar) or for a subdomain (www). If it also gives you an IPv6, it goes in an AAAA.
CNAME
It turns a name into an alias of another: www can be a CNAME of yourcompany.com.ar, or shop of a domain that a platform gives you. Two rules worth remembering:
- A name with a CNAME cannot have other records (such as MX or TXT) at that same name.
- A CNAME cannot be used at the root of the domain, because NS and other records always live there. Some providers offer an equivalent type (ALIAS, ANAME or "CNAME flattening") precisely for that case; if you do not have one, use an A record.
MX
It indicates the servers that receive the domain's email. Each MX carries a priority: the lowest number is tried first. If you use an email service (for example Google Workspace or Microsoft 365), they give you the exact values and they have to be entered as they are. If you change the MX records without planning, email can stop arriving.
TXT
It is a free-text record used to prove that the domain is yours (the verification for Google Search Console, for example) and for email authentication: SPF, DKIM and DMARC, which we explain in another guide. A domain can have many TXT records at the same name; services add theirs without overwriting each other, except for SPF, which must be a single one.
TTL and "propagation"
Every record has a TTL (time to live): the time, in seconds, that recursive servers may keep the answer before asking again. A TTL of 3600 means one hour.
When you change a record, the devices and providers that already had the old answer keep using it until its TTL expires. That is what is called "propagation": it is not that the change travels around the internet, but that old copies expire one by one. That is why a change can be visible within minutes in one place and hours later in another.
A good practice before a migration: lower the TTL to 300 seconds a few days earlier, make the change and raise it again afterwards. That way the cutover is short.
How to change a record without taking anything offline
- Write down or export the current zone. Before touching anything, copy all existing records: it is your backup.
- Identify what you are going to change and what depends on it. Changing the root A record does not affect email, but changing the NS records can affect everything.
- Enter the new value and, if possible, have the service running at the new location before pointing the domain at it.
- Verify with a lookup tool (for example
digornslookupin the terminal) that the record returns what you expect. - Test the website and the email from several networks (wifi and mobile data).
- Do not delete the old setup right away. Keep the previous service active for a few days.
Useful commands to verify:
dig yourcompany.com.ar A
dig yourcompany.com.ar MX
dig yourcompany.com.ar TXT
Subdomains
A subdomain is a name in front of your domain (shop.yourcompany.com.ar, blog.yourcompany.com.ar). It is created by adding a record (A or CNAME) with that name. It is useful to separate services: the store on one platform, the site on another hosting. Each subdomain can point to a different place. If you are going to verify your site with Google using a TXT record, follow the guide to connect your website to Google Search Console.
Common mistakes
- Editing the zone in the wrong place, without checking where the NS records point.
- Changing the MX records without migrating the email first.
- Having two SPF records instead of one. It breaks validation.
- Putting a CNAME at the root or next to other records.
- Forgetting the
www. If your site answers with and without www, both names need their record (or a redirect). - Expecting an immediate change with a high TTL.
Frequently asked questions
How long does a DNS change take?
It depends on the TTL that the previous record had. It can be a matter of minutes or up to a day or more if the TTL was high or if the NS records were changed.
Can I have DNS in one place and hosting in another?
Yes, and it is common. The only requirement is that the A or CNAME records point to the chosen hosting. If you want to understand who manages each piece, read domain and hosting: who owns what.
What are the records that my tool added and I do not recognize?
They are usually verifications or email authentication. Before deleting something you do not recognize, ask who added it.
What to do next
If you are going to migrate your website or your email and you want us to do it without downtime, take a look at the tune-up or get in touch.