How Email Typo Detection Works
Email typo detection compares the domain part of an address against a list of well-known domains using edit-distance matching (how many single-character changes separate two strings). If the domain is one or two edits away from a known domain — gmial.com vs gmail.com — it's flagged as a likely typo, along with the suggested correction. A match is only flagged when it's unambiguous: if two different known domains are equally close, no suggestion is made, since a confidently-wrong guess is worse than no guess.
Why a typo is a different problem than an invalid address
A typo'd domain — gmial.com, yaho.com, hotmial.com — usually isn't syntactically invalid and often doesn't even fail an MX lookup, since plenty of these near-miss domains are registered (sometimes deliberately, by someone squatting on common typos). That makes them slip past basic validation while still being wrong: the person meant to type gmail.com, and every message sent to the address they actually typed will never reach them. Catching this at the point of entry — not after the first email bounces or the confirmation link never gets clicked — is what typo detection is for.
How the check actually works
The domain of the submitted address is compared against a maintained list of popular, high-volume domains using Levenshtein edit distance — the minimum number of single-character insertions, deletions, or substitutions needed to turn one string into the other. "gmial.com" is one substitution away from "gmail.com" (distance of 1); "hotnail.com" is one substitution away from "hotmail.com". If the closest known domain is within the configured distance threshold, the address is flagged as a likely typo and a specific correction is suggested — the same local part, with the corrected domain.
| Submitted domain | Distance | Suggested correction |
|---|---|---|
| gmial.com | 1 | gmail.com |
| yaho.com | 1 | yahoo.com |
| hotmial.com | 1 | hotmail.com |
| outllok.com | 1 | outlook.com |
When the check deliberately stays silent
Three conditions suppress a typo flag, all in service of the same principle: a wrong suggestion is worse than no suggestion.
- The domain exactly matches a known domain already — nothing to correct
- The domain is too short to check meaningfully (very short strings produce noisy edit-distance matches against almost anything)
- Two or more known domains are equally close (ambiguous) — rather than guess between them, no suggestion is made at all
That ambiguous-match rule is the important one. If a domain sits at the same edit distance from two unrelated well-known domains, picking either one as "the" suggestion would be a coin flip presented as confident advice — so the check backs off instead of guessing.
Where a typo flag fits in the overall response
A detected typo surfaces in two places in the API response: checks.typo_detected (a boolean) and, where applicable, a suggested corrected address. It also contributes a small penalty to the email_quality score, on the reasoning that a typo'd address is a real, if minor, quality signal distinct from outright fraud — most typos are honest mistakes, not attempts to submit a fake address, so the impact is deliberately modest rather than treated the same as a disposable or role-based address.
Using it at the point of entry
The highest-value place to use a typo suggestion is inline, before the form is even submitted for real — showing "Did you mean user@gmail.com?" as a dismissible suggestion next to the email field, rather than silently blocking or auto-correcting. Auto-correcting without confirmation risks silently substituting the wrong address if the check is ever wrong; a dismissible suggestion catches the common case (a genuine typo) while leaving an unusual-but-real domain alone if that's actually what the person meant.
FAQ
No — it contributes a small penalty to the email_quality score and surfaces a suggested correction, but the overall allow/review/block decision depends on the full risk score, not a typo flag in isolation.
It's designed not to: a suggestion is only made when there's a single, unambiguous closest match among well-known domains within a small edit-distance threshold. A genuinely unusual or newer domain that doesn't closely resemble a well-known one won't be flagged.
The check compares against a maintained list of popular domains — mostly large consumer and business email providers — rather than an open-ended dictionary, since that's where edit-distance matching is both most useful and least likely to misfire.
No — a typo'd domain like gmial.com can still have valid MX records if someone registered it, which is exactly why typo detection exists as a separate check. See Why MX Validation Isn't Enough to Verify an Email for the broader version of this problem.