Skip to content
OSINTblogs

DNS records for OSINT: what each record type reveals

A domain's DNS records are public and say far more than where its website is. What A, MX, NS, SOA, TXT, CAA and other records reveal about hosting, email providers, software suppliers and ownership, the dig commands for each, and how historical DNS fills in the past.

· 7 min read

A DNS query for example.com above four rows: A and AAAA for hosting, MX for mail, TXT for services, and history from passive DNS.

Every domain publishes a small database about itself. It has to: without those records, browsers could not find the website and mail servers could not deliver the email. The records are public by design, answer instantly and need no account.

Most people look at one of them, the address of the website. Read together, the full set shows who hosts the site, who handles the email, which business software the organisation uses, how carefully it is run, and often which other domains belong to the same owner. This guide goes through each record type and what an investigator can take from it.

Querying DNS

dig is the standard tool on Linux and macOS, and is available for Windows. nslookup and PowerShell's Resolve-DnsName do the same job.

dig +short A example.com
dig +short MX example.com
dig +noall +answer TXT example.com

# Ask a specific public resolver
dig +short NS example.com @1.1.1.1

+short prints just the answers. Web-based lookup tools return the same data if you have no command line.

These queries go to public resolvers and to the domain's authoritative name servers. They are ordinary internet traffic and are not intrusive. If the name servers are run by the subject personally, a query does appear in their logs, so use a public resolver, which usually answers from its own cache.

The records

Record

Holds

What it tells an investigator

A, AAAA

IPv4 and IPv6 addresses

Where the site is hosted

CNAME

An alias to another name

Third-party platforms in use

MX

Mail servers

Who handles email

NS

Authoritative name servers

DNS provider. Shared custom name servers link domains

SOA

Zone administration details

A contact address, and a serial that may be a date

TXT

Free text

Email senders, verification tokens for services, policies

CAA

Permitted certificate authorities

Which issuers the owner uses

SRV

Service locations

Chat, phone and directory systems

PTR

Address to name

What the network operator calls a server

A and AAAA: where it is hosted

dig +short A example.com
dig +short AAAA example.com

Look up the address to find the hosting company and network. See IP address OSINT. Several addresses in a large provider's range usually mean a content delivery network, which hides the real server. A single address at a small host is more informative, and other domains on the same address may be related.

CNAME: who runs the service

A CNAME says "this name is really that name". Subdomains pointing to outside platforms reveal suppliers outright.

dig +short CNAME shop.example.com
dig +short CNAME status.example.com

A shop subdomain aliased to an e-commerce platform, a help centre to a support desk provider, a careers page to a recruitment system. Each is a named supplier. Finding the subdomains to test is covered in subdomain enumeration.

MX: who handles the email

dig +short MX example.com

MX host contains

Email provider

google.com, googlemail.com

Google Workspace

outlook.com, protection.outlook.com

Microsoft 365

pphosted.com, mimecast, barracuda

A security gateway in front of the real mail system

protonmail, zoho, fastmail

Those providers

The domain's own name

A self-hosted or web-host mail server

Nothing at all

The domain does not receive email

Uses: a business that claims to be established but has no mail records cannot receive replies to the address on its website. A lookalike domain with mail records configured is prepared to send or receive email, which raises the risk of invoice fraud. See lookalike domains. And knowing the mail platform tells you what a genuine message from the organisation should look like in its headers. See how to read email headers.

NS: who runs the DNS

dig +short NS example.com

Most domains use their registrar's or a large DNS provider's name servers, shared by millions. That is weak evidence of anything. Custom name servers, such as ns1.somecompany.net, are different: few domains use them, and the others that do are often under the same control. Reverse name-server lookup services list them.

A recent change of name servers, visible in historical data, often marks a change of owner or operator.

SOA: administrative details

dig +noall +answer SOA example.com

The answer includes the primary name server, a responsible-party field and a serial number.

  • The responsible party is an email address written with a dot in place of the at sign, so hostmaster.example.com. means hostmaster@example.com. On large providers it is generic. On self-managed zones it is sometimes a real person's address.

  • The serial is often written as a date followed by a counter, such as 2026111502, meaning the second change on 15 November 2026. Where that convention is used, it shows when the zone was last edited. Many providers use other schemes, so treat it as a hint.

TXT: the most revealing record

dig +noall +answer TXT example.com

TXT records hold free text, and organisations fill them with configuration that happens to describe their operations.

SPF lists who may send email for the domain:

v=spf1 include:_spf.google.com include:servers.mcsv.net include:sendgrid.net -all

Each include: names a service that sends mail on the organisation's behalf. This example shows a mail platform, a newsletter service and a transactional email service. Customer relationship, invoicing, ticketing and marketing systems all appear here. An ending of -all tells receivers to reject everything else, ~all is softer, and +all permits anyone, which is a serious misconfiguration.

Verification tokens prove to an outside service that the organisation controls the domain. Each one names a product in use:

Token begins

Service

google-site-verification=

Google services

MS=

Microsoft 365

facebook-domain-verification=

Meta business tools

apple-domain-verification=

Apple business services

atlassian-domain-verification=

Atlassian products

docusign=

DocuSign

stripe-verification=

Stripe

adobe-idp-site-verification=

Adobe

Dozens more exist. Together they form a list of software suppliers that the organisation never meant to publish. Defenders should review their own, since the same list helps an attacker write a convincing phishing email. Old tokens for services no longer used are common and worth removing.

The token values are tied to an account at the service. The same value on two domains means the same account verified both, which links them. See finding related websites.

These live at special names under the domain.

dig +short TXT _dmarc.example.com
dig +short TXT selector1._domainkey.example.com
dig +short TXT default._bimi.example.com
dig +short TXT _mta-sts.example.com
  • DMARC states what receivers should do with mail that fails authentication: p=none only monitors, p=quarantine sends to spam and p=reject refuses it. The rua= address receives reports, and often belongs to a monitoring vendor, naming another supplier. A domain with no DMARC record, or p=none, is easier to impersonate.

  • DKIM keys sit under a selector name that you have to know or guess. Common ones include selector1 and selector2 for Microsoft, google for Google, k1 for Mailchimp and s1 for SendGrid. The selector seen in a real email's headers tells you exactly which to query.

  • BIMI points to a brand logo for display in mail programs.

  • MTA-STS signals that the domain enforces encrypted mail delivery.

CAA: certificate issuers

dig +short CAA example.com

CAA lists which certificate authorities may issue certificates for the domain. It shows the issuers the organisation uses, and its presence indicates a degree of care. A certificate from an issuer not listed would be worth a closer look.

SRV: internal services

SRV records advertise services such as chat, telephony and directory systems.

dig +short SRV _sip._tls.example.com
dig +short SRV _xmpp-server._tcp.example.com
dig +short SRV _autodiscover._tcp.example.com

A result names the server providing the service, and so the product behind it.

PTR: reverse DNS

dig +short -x 203.0.113.10

A reverse lookup returns the name the network operator gave an address. Hosting companies often embed a customer or server identifier, and organisations with their own address space use descriptive names.

DNS history

Current records describe today. Passive DNS databases record what names resolved to over time, collected from resolvers around the world.

  • Earlier addresses of a site that now hides behind a delivery network can reveal the original server.

  • Earlier name servers and mail servers show changes of provider and owner.

  • Other names on the same address at the same time suggest related sites, if the address was not shared hosting.

  • First-seen dates show when a domain actually came into use, which may be long after it was registered.

VirusTotal, SecurityTrails and similar services offer free lookups with limits. Dates matter in every statement: "resolved to this address between March and June" is defensible, and "is hosted at" may be years out of date. See OSINT pivoting for judging links.

What DNS cannot tell you

  • Who owns the domain. That is registration data, a separate system. See investigating a domain.

  • What is behind a proxy. Delivery networks and DNS proxying show the provider's addresses.

  • Internal names. Organisations keep internal records on private servers.

  • Everything at once. There is no public query that lists all records. You ask for names you know or guess. Requesting a full zone transfer from someone's name servers is an active technique, usually refused, and outside passive research.

  • Intent. A missing DMARC record is poor practice, common among legitimate businesses.

A profile in five minutes

d=example.com
for t in A AAAA MX NS SOA TXT CAA; do echo "== $t"; dig +short $t $d; done
echo "== DMARC"; dig +short TXT _dmarc.$d

From the output you can usually state: where the site is hosted, which provider handles email, which DNS provider is used, which outside services send mail for the domain, which business platforms have been verified, and how strict the email authentication is. Save the output with the date and time. See preserving web evidence.

For running this across many domains and keeping the raw results, see automating OSINT with Python.

Frequently asked questions

What can DNS records tell you about a company?

Where its website and email are hosted, which DNS provider it uses, which third-party services send email for it, which business platforms it has verified its domain with, and how its email security is configured.

Yes. DNS records are published so that anyone can query them. Ordinary lookups are normal internet traffic.

How do I find out who a domain's email provider is?

Query its MX records. The host names usually identify the provider, such as Google Workspace or Microsoft 365, or a security gateway in front of it.

What is a TXT record used for?

Free-text data about a domain, most often SPF rules stating who may send its email and tokens proving ownership to outside services.

Can I see a domain's old DNS records?

Yes, through passive DNS services that record historical resolutions. They show earlier addresses, name servers and mail servers with dates.

Share this post

Written by

Dheeraj Yadav

Founder of OSINTverse, where I build OSINT tools for investigators and journalists. Self-taught ethical hacker working in bug hunting, malware analysis and digital forensics. Previously ran OSINTCon, now OSINT Collective.

Newsletter

New OSINT write-ups by email

An email when there are new posts on OSINTblogs. No fixed schedule and no account needed.

We email a link to confirm. Unsubscribe at any time. See the privacy policy.

More from Dheeraj Yadav

Report this post