Skip to content Use Monity from Claude, ChatGPT or Codex: set up monitors and ask what changed, from a chat. Use Monity from Claude, ChatGPT or Codex Connect yours
Tutorial 6 min read

How to check a domain’s DNS records (NS, MX, TXT, CNAME, A)

How to inspect a domain’s A, NS, MX, TXT and CNAME records using dig, nslookup or free browser tools, with real example.com outputs and RFC 1035, RFC 7208 and RFC 7489 rules.

Alex Lead Product Designer
UpdatedNovember 28, 2026 Read time6 min AudienceWeb developers, DevOps and IT teams

To check a domain’s DNS records, query each record type directly with dig or nslookup from a terminal, or check all four public resolvers in a browser using the free DNS propagation checker on Monity (monity.ai). Querying A, NS, MX, TXT and CNAME records shows where a site is hosted, where mail is delivered, which nameservers are authoritative, and whether SPF and DMARC records match their standards.

What each DNS record does

The core DNS record formats are defined in RFC 1035, with email authentication built on top of TXT records in RFC 7208 (SPF) and RFC 7489 (DMARC).

Record Purpose Standard
A Maps a host name to a 32-bit IPv4 address. A host with several IPv4 addresses publishes multiple A records (IPv6 uses AAAA). RFC 1035, Section 3.4.1
NS Names an authoritative host (NSDNAME) for the domain’s zone. RFC 1035, Section 3.3.11
MX Lists mail exchange hosts with a 16-bit preference integer; lower values are tried first. A single 0 . entry is a null MX declaring that the domain accepts no mail. RFC 1035, Section 3.3.9; RFC 7505, Section 3
CNAME Points an alias domain name to its canonical (primary) name. A node with a CNAME should not hold other record types, so zone apexes cannot use a standard CNAME alongside SOA and NS. RFC 1035, Section 3.3.1; RFC 1034, Section 3.6.2
TXT Holds one or more descriptive text strings whose meaning depends on the domain name. Used for domain verification, SPF and DMARC. RFC 1035, Section 3.3.14

SPF and DMARC inside TXT records

  • SPF (RFC 7208): Section 3.1 requires SPF policies to be published as DNS TXT (type 16) records only. Section 4.5 specifies that an SPF record must begin with v=spf1, and publishing more than one v=spf1 record produces a permerror. Section 4.6.4 limits DNS-querying terms (include, a, mx, ptr, exists and redirect) to 10 lookups per evaluation, after which evaluation must return permerror.
  • DMARC (RFC 7489): Section 6.1 places a domain’s DMARC policy as a TXT record at the _dmarc subdomain (for example, _dmarc.example.com). Section 6.3 requires v=DMARC1 first, followed by p= set to none, quarantine or reject, with optional tags such as sp for subdomains and adkim or aspf set to r (relaxed) or s (strict).

Check DNS records with dig (example.com output)

dig runs on macOS and Linux (and on Windows through BIND tools or WSL). Pass the domain and record type, and add +noall +answer to print only the answer rows. The outputs below were queried against example.com on 24 November 2026.

$ dig +noall +answer example.com A
example.com.        77    IN  A     172.66.147.243
example.com.        77    IN  A     104.20.23.154

$ dig +noall +answer example.com NS
example.com.        21600 IN  NS    elliott.ns.cloudflare.com.
example.com.        21600 IN  NS    hera.ns.cloudflare.com.

$ dig +noall +answer example.com MX
example.com.        125   IN  MX    0 .

$ dig +noall +answer example.com TXT
example.com.        300   IN  TXT   "_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9"
example.com.        300   IN  TXT   "v=spf1 -all"

$ dig +noall +answer _dmarc.example.com TXT
_dmarc.example.com. 300   IN  TXT   "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s"

$ dig +noall +answer +authority example.com CNAME
example.com.        1791  IN  SOA   elliott.ns.cloudflare.com. dns.cloudflare.com. 2420077714 10000 2400 604800 1800

Each answer row has five fields: the owner name, the remaining TTL in seconds, the class (IN for Internet), the record type, and the record value. On example.com, the MX record 0 . is a null MX (RFC 7505), paired with v=spf1 -all and a strict DMARC reject policy at _dmarc.example.com. Querying CNAME at the apex returns no answer, with the zone’s SOA record in the authority section to mark the empty reply.

To bypass your local resolver and ask a specific public resolver, append @1.1.1.1 or @8.8.8.8 to any command, such as dig @1.1.1.1 example.com NS.

Check DNS records with nslookup (example.com output)

nslookup comes with Windows and macOS; on Linux it’s in the dnsutils or bind-utils package. Use -type= to pick a record type. Running it against example.com on 24 November 2026 via 8.8.8.8 returns:

$ nslookup -type=A example.com
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   example.com
Address: 172.66.147.243
Name:   example.com
Address: 104.20.23.154

$ nslookup -type=NS example.com
Non-authoritative answer:
example.com nameserver = elliott.ns.cloudflare.com.
example.com nameserver = hera.ns.cloudflare.com.

$ nslookup -type=MX example.com
Non-authoritative answer:
example.com mail exchanger = 0 .

$ nslookup -type=TXT example.com
Non-authoritative answer:
example.com text = "_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9"
example.com text = "v=spf1 -all"

$ nslookup -type=CNAME example.com
*** Can't find example.com: No answer

“Non-authoritative answer” is normal: it means the recursive resolver (here 8.8.8.8) returned a cached or forwarded reply rather than answering as the domain’s own authoritative nameserver. To query a different resolver, add its address at the end: nslookup -type=MX example.com 1.1.1.1.

Free browser tools for checking DNS records

When you want to compare answers across resolvers without typing terminal flags, Monity provides five free lookup tools:

  • NS Lookup: shows the nameservers for any domain from four public resolvers, with TTLs, whether they agree, and what DNS standards ask for.
  • MX Lookup: lists a domain’s mail servers and priorities from four public resolvers, with TTLs and checks for null MX and broken records.
  • CNAME and TXT Lookup: queries four public resolvers to show where an alias points, and checks SPF and DMARC records against their RFCs.
  • DNS Propagation Checker: compares A, AAAA, CNAME, MX, NS or TXT records and their remaining TTLs across four public resolvers.
  • Website Hosting Checker: shows who hosts a site from every address its domain points to, each network’s owner in RDAP, and the DNS name servers.

Monitor DNS records on a schedule

Manual checks only catch a bad edit when you remember to run them. If you want alerts when a record changes or disappears, Monity’s uptime monitoring includes DNS monitors for A, AAAA, CNAME, MX, TXT and NS records alongside Website, Keyword, Port and Heartbeat monitors.

  1. Open Uptime in Monity and choose DNS.
  2. Enter the domain name, pick the record type to watch, and set how often it checks.
  3. Pick your alert channels: email, Slack, Microsoft Teams, Discord, Telegram, Google Sheets (one row per alert), signed webhooks (HMAC-SHA256) or push notifications in the iOS and Android app. Every alert channel is included on every plan.
Monity New uptime monitor screen showing the DNS monitor card beside Website, Keyword, Port, Email and Heartbeat, with the Summary panel showing Every minute uses about 44 credits a month
Monity’s New uptime monitor screen: pick DNS to check A, AAAA, CNAME, MX, TXT or NS records on a schedule; 1,000 uptime checks use 1 credit (about 44 credits a month at 1-minute intervals).

DNS monitors run every 5 minutes on the Free plan ($0/month, 3 monitors, 100 credits a month), every minute on plans that check pages every 15 to 60 minutes, and every 30 seconds on plans that check pages every 5 minutes. Every 1,000 uptime checks use 1 credit (a 1-minute monitor is about 44 credits a month). A failed check is re-checked 3 and 6 seconds later before an alert fires, and domain registration expiry warnings alert 30 days ahead by default (you can also check expiry once with the free domain expiry checker).

Public resolvers and local caches

A public lookup tool or DNS monitor queries public resolvers, not every local ISP cache worldwide. During a planned migration, other networks can keep serving an older record until its previous TTL expires. For checking a local split-horizon DNS zone inside a private network, run dig or nslookup from inside that network against your internal resolver. Monity’s uptime monitors do not ping (ICMP) or run traceroutes. Monitoring also does not lock your registrar account, so keep registrar lock and two-factor sign-in enabled at your registrar.

FAQ

Questions people ask

Why can’t a root domain have a standard CNAME record?

Under RFC 1034 Section 3.6.2, if a CNAME record is present at a domain node, no other data should be present at that node. Because a zone apex must hold SOA and NS records, standard DNS does not permit a CNAME at the root domain.

What does an MX record of 0 . mean?

RFC 7505 defines a single MX record with preference 0 and exchange . (dot) as a null MX. It tells sending mail servers that the domain explicitly accepts no email, so they should not fall back to trying its A or AAAA address.

Where do I query a domain’s DMARC record?

Query the TXT record at _dmarc.yourdomain.com, not the root domain. RFC 7489 Section 6.1 specifies that DMARC policy records live in the _dmarc subdomain and must start with v=DMARC1 followed by the p= policy tag.

Why do two DNS resolvers return different answers or TTLs?

Each recursive resolver caches answers independently and counts the TTL down toward zero from the moment it last fetched the record. After a DNS edit, one resolver may serve the new record while another serves the previous value until its cached TTL runs out.

Why does an SPF record fail with permerror?

Two common causes under RFC 7208 are publishing more than one TXT record starting with v=spf1 (Section 4.5) or exceeding the 10-DNS-lookup limit across include, a, mx, ptr, exists and redirect terms (Section 4.6.4).

How often can Monity check DNS records automatically?

Monity checks DNS monitors every 5 minutes on the Free plan (3 monitors, 100 credits a month) and as often as every 30 seconds on paid plans. Every 1,000 uptime checks use 1 credit, and failed checks are re-checked 3 and 6 seconds later before alerting.

Written by

Alex

Alex leads product design at Monity. From the plain-English setup to the way an alert is laid out, her work is about making website monitoring something anyone can use, technical or not. She writes here about product design and usability.

More by author
Kamil, Alex and Martyna A person replies within two working days

Have a question?

Pricing, security or scoping: pick one and your message goes to a person on the team.