Skip to content
Domain Typo Suggestion

Domain Typo Suggestion

smtp-probe automatically suggests corrected domain names when a typo is detected in the domain part of an email address or domain check.

How It Works

The suggestion engine uses a three-stage approach based on the AfterShip algorithm:

  1. Full-domain match — Compare the input domain against a known list of valid domains using Levenshtein edit distance (threshold: 2).
  2. Legitimacy fast-path — If both the SLD and TLD are in the known lists, no suggestion is needed (the domain may be valid but not in the full list).
  3. Split SLD/TLD correction — Correct the second-level domain and TLD separately when they don’t match known values.

When Suggestions Are Triggered

ScenarioTriggered?
check / report — MX lookup fails or returns no records✅ Yes
verify — SMTP connection fails (statusCode 0)✅ Yes
verify — SMTP returns 5xx (permanent rejection)✅ Yes
verify — MX lookup fails or returns no records✅ Yes
Domain is correctly spelled or in the known list❌ No
Domain is a non-email domain (e.g., example.org)❌ No

Example Output

💡 Did you mean gmail.com?

Or in JSON/Markdown output:

{
  "email": "user@gmil.com",
  "suggestion": "user@gmail.com"
}

Supported Providers

The suggestion engine covers major email providers including:

  • Gmail, Yahoo, Hotmail, Outlook, Live
  • ProtonMail, iCloud, AOL, Yandex
  • Chinese providers: 163, 126, Sina, QQ
  • And many more (120+ domain entries)

Limitations

  • Suggestions are based on edit distance and may not cover all possible typos.
  • Multi-part TLD domains (e.g., .co.uk, .com.au) are handled correctly.
  • Suggestions are only provided for known provider domains, not arbitrary domains.