What validation and verification mean
Email validation checks whether an address is well formed and plausible: correct syntax, a domain that exists, mail servers that accept mail, and a provider type you accept. Email verification checks whether a specific mailbox exists and whether the person signing up controls it. Validation is fast and runs at signup. Only a confirmation email verifies control.
The two terms are used loosely, and many products sell both under one name. It's more useful to think in five layers, each answering a narrower question at a higher cost:
- Syntax validation. Is the string a well-formed address?
- Domain checks. Does the domain exist, and does it publish mail servers?
- Risk classification. Is the provider disposable, free webmail, or a role address?
- Deliverability checks. Will the receiving server accept mail for this mailbox?
- Confirmation email. Can the person read mail sent to this address?
The following sections explain what each layer can and can't tell you, then which ones to use at signup and which before a marketing send.
Syntax validation
Syntax validation confirms that an address follows the format the email standards define, and it's the cheapest layer because it needs no network call. It also goes wrong more often than people expect, because the standards allow far more than most developers assume.
An address has a local part, an @ sign, and a domain. RFC 5322 defines the message format, and RFC 5321, which defines SMTP (the protocol that servers use to transfer mail), sets the length limits: 64 octets for the local part and 255 for the domain. The local part can contain characters such as +, !, #, and ', and it can be a quoted string that includes spaces. All of the following are valid under the RFCs:
o'brien@example.comuser+newsletter@example.com"first last"@example.comjosé@example.comHand-written regular expressions tend to fail in one of two directions. A strict pattern rejects real addresses, most often ones with a + tag or an apostrophe, and every rejection is a user who can't sign up. A loose pattern such as "anything, an @, anything, a dot, anything" accepts strings that no server can deliver to. An attempt to encode the full RFC 5322 grammar produces a pattern that's hard to read, slow on some inputs, and still accepts addresses that real mail systems refuse, such as ones with comments.
The HTML standard makes the same trade-off on purpose. The type="email" input uses a simplified rule that the WHATWG HTML specification calls "a willful violation of RFC 5322", because the RFC syntax is too strict, too vague, and too lax to be practical. That rule is a reasonable baseline for forms. It doesn't allow quoted local parts.
Internationalized addresses add two more cases. An internationalized domain name, such as one in Japanese or Arabic script, travels through DNS in an ASCII form called Punycode, defined by the IDNA standards in RFC 5890. A non-ASCII local part, such as josé, requires the SMTPUTF8 extension in RFC 6531, which both the sending and the receiving server must support. The HTML rule allows only ASCII in the local part, so josé@example.com fails it.
For signup, a practical rule is to accept what the HTML rule accepts, plus Unicode, reject what can't be delivered, and leave the rest to the later layers. Syntax tells you the string is shaped like an address. It tells you nothing about whether the domain exists.
Domain and MX checks
A domain check asks DNS whether the domain exists and which servers receive its mail. It catches typos such as a misspelled provider domain and made-up domains, and it costs one DNS lookup.
The Domain Name System (DNS) maps names to records. An MX record (mail exchanger record) names a server that accepts mail for a domain, with a priority number so that a sender knows which server to try first. To deliver to someone@example.org, a sending server looks up the MX records for example.org and connects to the server with the lowest number.
Three edge cases make a simple "has MX records" test less precise than it looks:
- Implicit MX. RFC 5321 section 5.1 says that if a domain has no MX records, a sender treats the domain's own address record as the mail server. A domain with no MX records can receive mail in theory. In practice, domains that receive mail publish MX records, and most validators treat a missing MX as undeliverable.
- Null MX. RFC 7505 defines a null MX, an MX record that points to
.and states that the domain accepts no mail. When we checked on November 24, 2026,example.compublished one. A check that only counts MX records sees one and passes the domain. - Registered typo domains. Some misspellings of popular providers are registered and have working mail servers. A domain check passes them, so it catches only some typos.
A DNS lookup usually takes a few milliseconds to a few tens of milliseconds, and results can be cached for their time to live. Decide what happens when the resolver is slow or fails. Treating a timeout as a pass avoids blocking a real user during a DNS outage. The privacy cost is low: only the domain goes to a resolver, not the full address.
Risk classification
Risk classification sorts a deliverable address by the kind of provider or mailbox it belongs to, so you can apply a policy. The address may work. The question is whether you want it.
The most common categories are the following:
- Disposable. A disposable email provider hands out throwaway inboxes, usually with no account required. They're used for repeat free trials, bulk account creation, and avoiding follow-up mail. Detection relies on lists of known domains, and stronger checks also look at which mail servers a domain uses, because disposable services rotate domains faster than lists update. For more information, see how to detect disposable email addresses.
- Free webmail. Gmail, Outlook.com, Yahoo Mail, and similar providers. These are where most consumers have their address, so blocking them is rarely right for a consumer product. Some B2B products use the category to route leads or to ask for a work address. For more information, see how to block free email providers on a B2B signup.
- Role addresses. Addresses that belong to a function rather than a person, such as
info@,support@, orpostmaster@. RFC 2142 lists the standard role mailbox names. Role addresses often go to several people or to a ticket queue. They're a poor fit for a personal account and a common source of spam complaints on marketing lists.
Classification depends on a data source. A domain list runs locally and sends nothing anywhere, but you maintain it. An API sends the address or the domain to a third party, which is a data-processing relationship you need to account for in your privacy documentation. Some signals, such as whether an address has a Gravatar profile, require looking up a hash of the full address with an outside service.
SMTP deliverability checks
An SMTP check, often called SMTP probing, connects to the domain's mail server and asks whether it accepts a specific mailbox, then disconnects without sending a message. It's the only layer that addresses whether the mailbox exists, and it's the least reliable.
A probe opens a connection to the MX host on port 25, introduces itself with EHLO, names a sender with MAIL FROM, names the address with RCPT TO, and reads the reply code. A 250 reply means the server accepted the recipient. A 550 reply usually means the mailbox doesn't exist. The probe then sends QUIT instead of a message. SMTP also has a VRFY command for asking about an address, but RFC 5321 lets administrators disable it, and many do.
Mail servers often don't answer a probe honestly, for the following reasons:
- Catch-all domains. A catch-all domain accepts mail for every address, so every probe gets
250, including for mailboxes that don't exist. Some company domains are configured this way. - Accept now, bounce later. Some providers accept every recipient during the SMTP conversation and send a bounce message afterward. This hides which mailboxes exist from people who collect addresses.
- Greylisting. A greylisting server rejects the first attempt from an unknown sender with a temporary error and accepts a retry minutes later (RFC 6647). A probe that doesn't wait reads this as unknown.
- Anti-harvesting defenses. Many connections that check addresses and never send mail look like a directory harvest attack, in which a spammer guesses addresses to find valid ones. Servers slow these connections down, refuse them, or return misleading replies.
Probing also has a cost to you. If you run probes from your own servers, receiving systems see your IP addresses behaving like a harvester, and that can put them on blocklists that hurt delivery of your real mail. Many cloud providers restrict outbound traffic on port 25 by default, so probes may not work from your infrastructure at all. A third-party verification service runs probes from its own addresses, which moves the reputation risk to them, but it means you send them every address you check. Latency is measured in seconds, and greylisting can stretch it to minutes, which is too slow to run while a user waits on a signup form.
Confirmation emails
A confirmation email is the only check that proves the person controls the inbox. You send a message with a link or a code, and the person proves receipt by using it. This is also called double opt-in when it confirms a mailing list subscription.
Build the link from a random, single-use token with an expiry. Store a hash of the token rather than the token itself, so a database leak doesn't expose working links. Rate limit the "resend confirmation" action, because an attacker can use it to send mail to someone else's address.
Confirmation proves control and nothing else. A disposable inbox can receive a confirmation email, and scripts can read it through the provider's API. Confirmation also adds friction, so some users never finish. Many products give limited access before confirmation and hold back the features that cost money or reach other users, such as free compute, invitations, or messaging.
Which layers to use at signup and before a send
At signup, run syntax, domain, and risk checks while the user waits, then send a confirmation email. Before a marketing send, rely on confirmation status and your own bounce history, and use deliverability checks only for lists you can't otherwise trust.
The following table compares the layers on when to use them and what each one costs:
| Layer | At signup | Before a marketing send | Typical latency | Privacy cost |
|---|---|---|---|---|
| Syntax | Yes | Already done at collection | Microseconds, no network | None |
| Domain and MX | Yes | Yes, for old lists, because domains expire | Milliseconds, one DNS lookup | Low: the domain goes to a resolver |
| Risk classification | Yes, with a policy per category | Optional: remove role addresses | None for a local list; one API call otherwise | None for a local list; the address or domain for an API |
| SMTP probing | No | Only for imported or stale lists, through a provider | Seconds to minutes | High: the full address goes to a third party |
| Confirmation email | Yes, after the account exists | Send only to confirmed addresses | Minutes, waiting on the person | The address goes to your email provider |
The signup path favors fast, local checks because a slow form loses users, and because the confirmation email does the verifying afterward. SMTP probing adds seconds and gives an unreliable answer that the confirmation email replaces.
A marketing send has the opposite constraint. Nobody waits, but every bounce and spam complaint counts against your sending reputation with mailbox providers. If you collected addresses with confirmation, your list is already verified, and your email service provider's bounce and complaint suppression keeps it clean. If you import a list you didn't build, or send to addresses that haven't received mail in a long time, a verification service is a reasonable one-time cleaning step, as long as your privacy terms cover sending those addresses to it.
Example: validation at signup with Arcjet
Arcjet is a security SDK that you add to your application code. It runs checks such as bot detection, rate limiting, and email validation inside your request handlers. Its email rule covers the first three layers: syntax checks run locally in the SDK, and the domain, MX, and provider checks run in the Arcjet API.
The following Next.js Route Handler uses @arcjet/next 1.15.0. It denies disposable, invalid, and undeliverable addresses. A second rule in DRY_RUN mode flags free webmail addresses without blocking them, which is the pattern the Arcjet email validation reference recommends for review rather than rejection.
import arcjet, { validateEmail } from "@arcjet/next";import { NextResponse } from "next/server";
const aj = arcjet({ key: process.env.ARCJET_KEY!, rules: [ validateEmail({ mode: "LIVE", deny: ["DISPOSABLE", "INVALID", "NO_MX_RECORDS"], }), // Flag free webmail for review without blocking it. validateEmail({ mode: "DRY_RUN", deny: ["FREE"] }), ],});
export async function POST(req: Request) { const { email } = await req.json(); const decision = await aj.protect(req, { email });
if (decision.isDenied() && decision.reason.isEmail()) { return NextResponse.json( { error: "We couldn't use that email address." }, { status: 400 }, ); }
const flagFree = decision.results.some( (r) => r.state === "DRY_RUN" && r.isDenied() && r.reason.isEmail(), );
// Create the account, store flagFree, and send a confirmation email. return NextResponse.json({ ok: true });}Arcjet doesn't probe mailboxes over SMTP, doesn't classify role addresses, and doesn't send confirmation emails. Add a role-address check yourself if your product needs one, and keep the confirmation email. For a full walkthrough, including Server Actions and a dry-run rollout, see how to block disposable email in Next.js.
Frequently asked questions
Is a regular expression enough to validate an email address?
No. A regex can check shape, but it either rejects valid addresses such as ones with a plus sign or apostrophe, or accepts addresses no server can deliver to. Pair a permissive syntax check with a domain check and a confirmation email.
What is an MX record?
An MX (mail exchanger) record is a DNS entry that names a server that accepts mail for a domain, with a priority number. A domain with no MX records publishes no mail servers, which usually means a typo or an unused domain.
Why do SMTP verification checks return unreliable results?
Catch-all domains accept every address, some providers accept every recipient and bounce later, greylisting returns temporary errors, and servers defend against address harvesting. A probe often can't tell a real mailbox from a missing one.
Can SMTP probing hurt my email deliverability?
Yes. Probes from your own servers look like a directory harvest attack, which can put your IP addresses on blocklists that also affect the mail you send to customers.
Does a confirmation email prove the user is real?
It proves the person or program can read mail at that address, nothing more. A disposable inbox can receive and confirm the message, so combine confirmation with disposable-domain checks and bot detection.
Application security in your code
Protect your application with Arcjet
Arcjet checks syntax, mail servers, and disposable and free providers at signup, alongside bot detection and a rate limit. Send the confirmation email yourself.