DNS records explained: A, AAAA, MX and NS
DNS links your domain name to servers. You manage it at your registrar or DNS provider, and a few records determine whether your website and email work.
The most important records
Each record type has its own job. That's why a mistake in one record often affects only one service: your website can work fine while your email doesn't arrive, or the other way around.
- A: the IPv4 address of your web server. Without an A or AAAA record, your website is unreachable.
- AAAA: the IPv6 address of your web server. Optional; without AAAA your site simply works over IPv4.
- CNAME: a pointer to another name, for example www.example.com to example.com. A name with a CNAME can't have any other records, so on the root domain itself you usually use an A record.
- MX: the mail server that receives email for your domain. If you don't receive email, you can leave it out or use a "null MX" (0 .).
- NS: the name servers that manage your domain. You set these at your registrar.
- TXT: free text, used among other things for SPF, DMARC, DKIM and verification with services such as Google.
Domain and www
A website often runs on both example.com and www.example.com. Point both to your server, and redirect one to the other so there's one fixed address. SteadyHost checks example.com and falls back to www if only that one points to a server.
example.com. 3600 IN A 203.0.113.10
www.example.com. 3600 IN A 203.0.113.10
example.com. 3600 IN MX 10 mail.example.com.Changes, TTL and propagation
Every record has a TTL: the number of seconds resolvers (the DNS servers of providers and corporate networks) may remember an answer. So "DNS propagation" isn't a process you can speed up: after a change, some visitors see the new address right away and others only once their resolver forgets the old answer, at the latest after the old TTL.
So lower the TTL a day before a planned migration, for example to 300 seconds, and set it back afterward. If you switch name servers, expect a longer transition, up to about two days, because the data at the registry of the domain extension is cached as well.
Look up DNS records yourself
Use dig (macOS and Linux) or nslookup (Windows) to look up records. To find out whether a change has gone through without being affected by caches, ask one of your own name servers directly.
dig +short example.com A
dig +short example.com MX
dig +short example.com NS
dig +short @ns1.yourdnsprovider.com example.com A
nslookup -type=MX example.comHow SteadyHost rates DNS
- OK: there's an A or AAAA record for your website and there are name servers.
- Warning: no name servers were found.
- Problem: there's no A or AAAA record, so the domain doesn't point to a web server.
- A missing AAAA or MX record isn't an error.
Check your own website
A free check shows within seconds how your website is doing: availability, HTTPS and TLS, the SSL certificate, security headers, DNS and DNSSEC, domain registration and email security.
More guides
- Website down? How to find the cause
- HTTPS and redirecting HTTP to HTTPS
- How to check an SSL certificate is valid
- TLS versions: disable TLS 1.0 and 1.1
- Security headers explained, with examples
- Mixed content: http:// on an HTTPS page
- security.txt: where to report vulnerabilities
- What is DNSSEC and how do you enable it?
- CAA record: who can issue your certificates?
- Check domain registration: status and expiry
- How to set up an SPF record for your domain
- How to check and set up a DKIM record
- What is DMARC and how do you set it up?