How to Check the DNS Records of a Domain (Online, CMD, PowerShell, dig)

To check the DNS records of a domain, enter it in our DNS Lookup, which shows A, AAAA, MX, NS, TXT, CNAME and SOA records from public resolvers in one place. From the command line, use nslookup -type=TXT example.com on Windows, Resolve-DnsName example.com -Type MX in PowerShell or dig example.com TXT +short on macOS and Linux. To confirm a change, query the domain’s own nameservers directly, because public resolvers may still have the old answer cached.

Common record types

RecordHoldsTypical use
A / AAAAIPv4 / IPv6 addressPoints the domain to a server
CNAMEAnother host nameAliases such as www → example.com
MXMail server and priorityWhere e-mail is delivered
TXTFree textSPF, DKIM, DMARC, domain verification
NSNameserversWhich servers answer for the domain
SOAZone settingsPrimary server, serial number, timers
CAAAllowed certificate authoritiesRestricts who may issue SSL certificates

All types are described in DNS record types explained.

On Windows

nslookup -type=A example.com
nslookup -type=MX example.com
nslookup -type=TXT example.com 1.1.1.1
Resolve-DnsName example.com -Type TXT

Adding a server address at the end (1.1.1.1) asks that resolver instead of your default one.

On macOS and Linux

dig example.com A +short
dig example.com MX +short
dig _dmarc.example.com TXT +short
dig @1.1.1.1 example.com NS

More options are covered in how to use dig.

Why there is no “show all records”

DNS does not offer a reliable way to list every record of a zone. The old ANY query is answered minimally by most servers today (RFC 8482), and zone transfers are disabled for security. Tools therefore query each record type separately, and only the records you ask for by name are found. Subdomains, for example, have to be guessed or discovered; see how to find subdomains of a domain.

Verifying a change

  1. Find the domain’s nameservers: dig NS example.com +short.
  2. Ask one of them directly: dig @ns1.provider.net example.com TXT. If the new value is there, the change is saved correctly.
  3. Check public resolvers with the DNS Propagation Checker. Old values disappear when the record’s TTL expires; see why DNS changes are not showing.

Common Questions

Why do I see a different result than my colleague?

Resolvers cache answers for the record's TTL, and CDNs return different addresses by location, so two people can see different records for a while.

How do I check DNS records for a subdomain?

Query the full name, for example dig blog.example.com A or nslookup blog.example.com. Each subdomain has its own records.

How do I check SPF, DKIM and DMARC records?

They are TXT records: SPF on the domain itself, DMARC at _dmarc.example.com and DKIM at selector._domainkey.example.com.

Can I see deleted or old DNS records?

Not through DNS. Historical data comes from services that recorded past lookups; our IP History tool shows addresses seen for a domain.

Link to or cite this page

Found this useful? You are welcome to link to it from your website, documentation, course material or forum answers.

HTML link <a href="https://ipdnshub.com/resources/how-to-check-dns-records-of-a-domain">How to Check the DNS Records of a Domain (Online, CMD, PowerShell, dig) – IP DNS Hub</a>
Citation "How to Check the DNS Records of a Domain (Online, CMD, PowerShell, dig)." IP DNS Hub. https://ipdnshub.com/resources/how-to-check-dns-records-of-a-domain