Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Find out which email provider and SaaS tools a company uses, from public DNS (Node.js)

Most "what is this site built with" tools only look at a page's HTML. But a company's DNS records tell you things the HTML never shows: which email provider they use, which services send email on their behalf, and which

Most "what is this site built with" tools only look at a page's HTML. But a company's DNS records tell you things the HTML never shows: which email provider they use, which services send email on their behalf, and which SaaS tools they've verified their domain with. All of it is public, and you can read it in a few lines of Node.js with no API key.

1. MX records → email provider

import { promises as dns } from 'node:dns';

const mx = await dns.resolveMx('allbirds.com');
console.log(mx.map((r) => r.exchange));
// [ 'allbirds-com.mail.protection.outlook.com' ]

*.mail.protection.outlook.com means Microsoft 365. A few common patterns:

MX host contains Provider
aspmx.l.google.com, googlemail.com Google Workspace
mail.protection.outlook.com Microsoft 365
zoho. Zoho Mail
pphosted.com Proofpoint (security gateway)
mimecast.com Mimecast (security gateway)

2. SPF → who sends email for them

The SPF record is a TXT record starting with v=spf1. Every include: is a service allowed to send mail as that domain:

const txt = (await dns.resolveTxt('example.com')).map((parts) => parts.join(''));
const spf = txt.find((t) => t.startsWith('v=spf1')) || '';
const includes = [...spf.matchAll(/include:([^\s]+)/g)].map((m) => m[1]);
// e.g. [ 'spf.protection.outlook.com', 'sendgrid.net', '_spf.salesforce.com', 'servers.mcsv.net' ]

sendgrid.net → SendGrid, servers.mcsv.net → Mailchimp, _spf.salesforce.com → Salesforce, amazonses.com → Amazon SES, mail.zendesk.com → Zendesk.

3. Verification TXT records → SaaS tools

When a company connects its domain to a SaaS product, it usually adds a TXT record like atlassian-domain-verification=… or docusign=…. They stay there for years:

const PATTERNS = {
  'atlassian-domain-verification': 'Atlassian',
  'docusign=': 'DocuSign',
  'miro-verification': 'Miro',
  'google-site-verification': 'Google Search Console',
  'MS=': 'Microsoft 365',
  'apple-domain-verification': 'Apple',
  'slack-domain-verification': 'Slack',
  'zoom-domain-verification': 'Zoom',
  'stripe-verification': 'Stripe',
  'openai-domain-verification': 'OpenAI',
};
const tools = [...new Set(txt.flatMap((t) =>
  Object.entries(PATTERNS).filter(([p]) => t.startsWith(p)).map(([, name]) => name)))];

For allbirds.com this returned Apple, Microsoft 365, DocuSign, Miro and Google Search Console when I ran it.

Why this is useful

  • Sales & lead qualification: "companies on Google Workspace that also use HubSpot" is a very different list from "companies on Microsoft 365 using Salesforce".
  • Competitor research: see which tools a competitor has rolled out.
  • IT/security inventory: audit your own domains for forgotten SaaS verifications and over-broad SPF includes.

A few caveats: verification records can be stale (a tool was tried and dropped), and some companies route MX through a security gateway, which hides the mailbox provider behind it.

Doing it in bulk

The snippets above are enough for a handful of domains. For thousands, you also want concurrency, timeouts, a much bigger pattern list, and the website's own tech stack (CMS, analytics, frameworks) in the same row. I packaged all of that as a pay-per-use tool on Apify: Website Tech Stack Detector + Email & SaaS Provider Lookup. Paste domains, get one row per domain with technologies, email provider, SPF services and verified SaaS tools, exportable to CSV/Excel or callable from an API.

But if you only need DNS, the 30 lines above are all you need. Happy digging!

Disclosure: I built the Apify tool linked above. This article was written with AI assistance and the code was tested before publishing.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.