DNS records explained simply, from A record to TXT
What A, AAAA, CNAME, MX, NS and TXT mean, when you need which one and why changes sometimes take hours. For everyone who manages their own domain.
DNS (Domain Name System) is the phone book of the internet. It translates names like example.com into the addresses of the servers that host your website and mailboxes. If you own a domain, you manage a small list of records for it. Most mistakes during moves and new websites happen right there.
Our DNS lookup shows what your domain’s records currently look like.
Where the records are managed
The records live on your domain’s name servers. That is usually your domain provider, but sometimes your host or a service such as Cloudflare. You can see which name servers are responsible from the NS record. If you change records somewhere else, they have no effect. This is one of the most common reasons why “nothing happens”.
The most important records
A and AAAA: where is the website?
The A record links a name to an IPv4 address, the AAAA record to an IPv6 address.
example.com. A 203.0.113.10
example.com. AAAA 2001:db8::10
If there is an AAAA record, the server must also respond correctly over IPv6. Otherwise the website won’t work for some visitors, specifically those with an IPv6 connection. If you are unsure, leave the AAAA record out.
CNAME: an alias for another name
A CNAME says: “Ask this other name instead.” It is typically used for the www version or for services such as online shops and website builders:
www.example.com. CNAME example.com.
shop.example.com. CNAME shops.myshopify.com.
A name with a CNAME must not have any other records. That is why a CNAME for the main domain itself (without www) is not possible with most providers.
MX: who receives your email?
MX records name the servers that accept email for your domain. The number in front is the priority: the lower one is tried first.
example.com. MX 10 mx1.mailprovider.example.
example.com. MX 20 mx2.mailprovider.example.
When you switch email providers, these are exactly the records you change. If you forget old records, some of your email ends up at your former provider.
TXT: free text for proofs and rules
TXT records contain text. They are used for many purposes:
- SPF defines who may send email for you (
v=spf1 …). - DMARC lives under
_dmarcand governs how spoofed email is handled. - DKIM keys live under names like
selector._domainkey. - Verifications for Google Search Console, Microsoft 365 and other services.
More on the email records in How to set up SPF, DKIM and DMARC.
NS: who is responsible?
The NS records name your domain’s name servers. You change them at your domain provider if you want to move the management of your records elsewhere, for example to Cloudflare.
CAA: who may issue certificates?
With CAA you define which certificate authorities may issue SSL certificates for your domain. It is optional but protects against wrongly issued certificates.
example.com. CAA 0 issue "letsencrypt.org"
Watch out: if you set a CAA record, the provider of your current certificate must be included. Otherwise the next renewal fails.
Why changes take time
Every record has a TTL (time to live) in seconds. That is how long routers, internet providers and computers may cache the answer. With a TTL of 3600, it can take up to an hour until everyone sees the new address.
Tip for a planned move: set the TTL to 300 seconds a day before. The actual switch then goes through within a few minutes. Afterwards you can raise it again.
If our DNS lookup already shows the new address but your computer still shows the old one, the cache on your side is to blame. Restarting your router usually helps.
Typical mistakes when moving a website
- Only
example.comswitched,wwwforgotten. Depending on what visitors type, they land on the old or the new site. - MX records deleted during the move. The new host takes over the domain, and suddenly no email arrives.
- Name servers changed without transferring the records. Once you switch name servers, only the records at the new service apply.
- Old AAAA record forgotten. IPv6 visitors still end up on the old server.
After every change, check with the DNS lookup that all records are correct.