Check any domain now with the DNS lookup.
What DNS does
DNS, the Domain Name System, turns names that people use into the data that computers need, mostly IP addresses. It is a worldwide database in which every domain owner controls the records of their own domain.
The main record types
| Type | Purpose | Example value |
|---|---|---|
| A | Name to IPv4 address | 93.184.216.34 |
| AAAA | Name to IPv6 address | 2606:2800:220:1:248:1893:25c8:1946 |
| CNAME | Alias of another name | shops.example.net. |
| MX | Mail server and priority | 10 mail.example.com. |
| TXT | Text: SPF, DKIM, DMARC, verification | "v=spf1 include:_spf.example.net ~all" |
| NS | Authoritative name servers of the zone | ns1.example.com. |
| SOA | Zone data: primary server, serial, timers | ns1.example.com. admin.example.com. 2024010101 7200 3600 1209600 300 |
| CAA | Certificate authorities allowed to issue certificates | 0 issue "letsencrypt.org" |
| SRV | Host and port of a service | 10 5 5060 sip.example.com. |
| PTR | IP address to name (reverse DNS) | host.example.com. |
How a name is resolved
- Your device asks its resolver, usually run by your internet provider or a public service, for www.example.com.
- If the resolver has no fresh answer, it asks a root server, which points to the servers of the .com zone.
- The .com servers point to the name servers of example.com, the authoritative servers.
- The authoritative server answers with the record. The resolver passes it on and keeps a copy for the TTL of the record.
TTL and propagation
The TTL (time to live) is the number of seconds that a resolver may keep an answer. A TTL of 3600 means one hour. There is no worldwide "propagation" in the sense of a push: when you change a record, each resolver simply keeps showing the old answer until its copy expires. That is why you should lower the TTL before a planned change, and raise it again afterwards.
Typical setups
example.com. 300 IN A 93.184.216.34 www.example.com. 300 IN CNAME example.com. example.com. 3600 IN MX 10 mail.example.com. example.com. 3600 IN TXT "v=spf1 mx -all" _dmarc.example.com. 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com" example.com. 3600 IN CAA 0 issue "letsencrypt.org"
Common mistakes
- A CNAME at the root. The root of a domain needs NS and SOA records, and a CNAME cannot share a name with other records. Use an A record, or an ALIAS or flattened CNAME.
- A CNAME next to other records on the same name, such as a CNAME and an MX.
- Two SPF records. Only one TXT record may start with v=spf1.
- MX pointing to an IP or a CNAME. It must point to a host name with an A or AAAA record.
- A trailing dot problem. In a zone file, a name without a final dot gets the domain added. Some providers want the dot, and some forbid it.
- Editing at the wrong provider. Only the provider named in your NS records controls the zone.
- A forgotten AAAA record that sends IPv6 visitors to an old server.
Check records from the command line
dig example.com A dig +short example.com MX dig example.com TXT @1.1.1.1 dig example.com NS dig -x 93.184.216.34 nslookup -type=MX example.com Resolve-DnsName example.com -Type TXT
Use dig @ns1.example.com example.com to ask an authoritative server directly and skip every cache.
Tools on this site
- DNS lookup for all record types, and the DNS record checker to compare resolvers.
- A record lookup, MX lookup and TXT lookup.
- CIDR calculator and the CIDR guide for address ranges.