Free and disposable email domains in a single list, validated against DNS every day.
- 30,000+ domains. Free providers (Gmail, Yahoo, Outlook and thousands of regional ones) and disposable providers (Mailinator, Temp Mail and the like) together.
- Six sources plus a curated list. Merged, deduplicated and lowercased.
- Validated against DNS. A domain is removed when its DNS records say it cannot receive email.
- Updated every day. A new version is published whenever the list changes.
- Zero dependencies. It is a JSON array of strings, with TypeScript types.
- Block temporary or throwaway inboxes during signup.
- Tell personal emails from work emails to qualify leads.
- Reduce fake form submissions.
- Keep CRM and email workflows cleaner.
$ npm install free-email-domains --saveThe module exports an array of lowercase domains:
const freeEmailDomains = require('free-email-domains')
freeEmailDomains.includes('gmail.com') // => true
freeEmailDomains.includes('mailinator.com') // => true
freeEmailDomains.includes('your-company.com') // => falseIt works the same with ES modules:
import freeEmailDomains from 'free-email-domains'Create a Set once to get constant time lookups, then compare the part after the last @ in lowercase:
const freeEmailDomains = new Set(require('free-email-domains'))
const isFreeEmail = email => {
const domain = email.slice(email.lastIndexOf('@') + 1).toLowerCase()
return freeEmailDomains.has(domain)
}
isFreeEmail('hello@gmail.com') // => true
isFreeEmail('Hello@Mailinator.com') // => true
isFreeEmail('hello@your-company.com') // => falseDomains are matched exactly: gmail.com is listed, mail.gmail.com is not.
The list is a plain JSON file, so any language can use it:
$ curl -sL https://cdn.jsdelivr.net/npm/free-email-domains/domains.jsonThe list is rebuilt every day from these sources:
- HubSpot free domains – free email providers.
- castle/disposable-email-domains – disposable providers.
- disposable-email-domains/disposable-email-domains – disposable providers.
- groundcat/disposable-email-domain-list – disposable providers, MX validated.
- 7c/fakefilter – disposable providers observed in the wild.
- unkn0w/disposable-email-domain-list – disposable providers.
- A curated list of providers missing from the sources above, at scripts/sources.mjs.
Then every domain coming from a source is checked against DNS, asking two public resolvers (Cloudflare and Google):
| DNS answer | Result |
|---|---|
| It has MX records | kept |
| It has no MX records but it has an A or AAAA record (implicit MX) | kept |
| It publishes a null MX | removed |
| It does not exist, or it has no MX, A or AAAA record | removed |
| Timeout or server failure | unchanged from the previous scan |
A domain is only removed when both resolvers agree it cannot receive email. Removed domains are stored at inactive-domains.json, and they come back on the first daily scan where a resolver finds them accepting email again.
The scan refuses to write anything when a resolver fails a sanity check (gmail.com must be active, a .invalid name must not exist), or when too many domains come back inactive or unanswered.
Curated domains are never removed by the scan. Domains listed by a source that are neither free nor disposable providers are excluded with the allowlist at scripts/sources.mjs.
Fetch the sources, scan DNS and write domains.json and inactive-domains.json:
$ npm run updateThe scan takes about a minute. The postinstall script does the same without the DNS scan, reusing inactive-domains.json:
$ node scripts/postinstall.mjs- Missing a provider? Add it to
DOMAINSat scripts/sources.mjs. - Is a legit business domain listed? Add it to
ALLOWLISTat scripts/sources.mjs.
- email-providers – Top 3k common emails by Alexa rank.
free-email-domains © Microlink, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
microlink.io · GitHub microlinkhq · X @microlinkhq

