microlinkhq/free-email-domains
About
+30,000 free and disposable email domains in a single list, validated against DNS every day.
Productivity & AutomationWhat you can do
- 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.
Measured star growth
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- +4
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
free-email-domains
Free and disposable email domains in a single list, validated against DNS every day.
Highlights
- 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.
Why use it
- 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.
Install
$ npm install free-email-domains --save
Usage
The 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') // => false
It works the same with ES modules:
import freeEmailDomains from 'free-email-domains'
Checking an email address
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('[email protected]') // => true
isFreeEmail('[email protected]') // => true
isFreeEmail('[email protected]') // => false
Domains are matched exactly: gmail.com is listed, mail.gmail.com is not.
Without Node.js
The list is a plain JSON file, so any language can use it:
$ curl -sL https://cdn.jsdelivr.net/npm/free-email-domains/domains.json
How the list is built
The 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.
Update data
Fetch the sources, scan DNS and write domains.json and inactive-domains.json:
$ npm run update
The scan takes about a minute. The postinstall script does the same without the DNS scan, reusing inactive-domains.json:
$ node scripts/postinstall.mjs
Contributing
- Missing a provider? Add it to
DOMAINSat scripts/sources.mjs. - Is a legit business domain listed? Add it to
ALLOWLISTat scripts/sources.mjs.
Related
- email-providers – Top 3k common emails by Alexa rank.
License
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
Explore related projects
Loading…