The 421 error code means a server rejected your request on this connection, most often from a misdirected web request or a temporary mail-server shutdown.
A “421” can show up in two places that feel unrelated: a web browser or API client, and an email log. That overlap is the trap. If you treat every 421 the same, you can chase the wrong fix for hours.
This guide splits the two meanings, shows how to spot which one you have in under a minute, then walks through fixes that actually change the outcome right away.
What A 421 Error Code Means In Plain Terms
On the web side, 421 is the HTTP status “Misdirected Request.” It shows up when your request reaches a server, but that server can’t answer for the scheme and host you asked for on that connection. That’s common with HTTP/2 connection reuse, reverse proxies, and multi-site TLS setups.
On the email side, 421 is an SMTP reply classed as a temporary failure. Many servers use it when they are shutting down, too busy, rate-limiting, or rejecting a connection for policy reasons. Mail software treats it as a soft bounce and will retry based on its queue rules.
Quick ways to tell which “421” you have
- Check the prefix — “HTTP/2 421” or a browser error page points to web traffic; “421 4.x.x” inside mail logs points to SMTP.
- Look for the word “Misdirected” — that wording is tied to the HTTP meaning and is common in server responses and CDN logs.
- Scan the surrounding lines — email traces mention SMTP verbs like HELO, MAIL FROM, RCPT TO; web traces mention URLs, Host headers, and TLS.
421 in HTTP vs SMTP at a glance
| Where you see it | Typical text | What it signals |
|---|---|---|
| Browser / API | 421 Misdirected Request | Wrong server for that host on this connection |
| Mail logs | 421 4.3.2 Service not available | Temporary SMTP refusal; retry later |
| Mail logs | 421 4.7.0 Try again later | Throttling or policy delay |
Where 421 Shows Up And Why It Feels Random
Most 421 reports come from “shared connection” setups. A single network path carries traffic for many names, many certificates, and sometimes many apps. When one layer guesses wrong, the request lands on a server that can’t speak for that exact hostname.
Mail systems create a similar feeling. A message can pass your outbound checks, then fail at a recipient’s edge due to load, temporary blocks, or greylisting. You see a 421, wait, and it works later. That makes people chase ghosts.
Common web-side triggers
- HTTP/2 connection reuse — a client reuses one TCP/TLS connection for multiple origins that share an IP, then the server refuses one origin on that connection.
- TLS SNI mismatch — the certificate and server block served on a connection don’t match the Host header you send.
- Reverse proxy routing gaps — a proxy forwards a request to an upstream that is not mapped for that hostname.
- CDN or load balancer pool drift — one node has the right config, another doesn’t, so the error comes and goes.
Common email-side triggers
- Server overload — the receiving SMTP service is running hot and rejects new sessions to protect itself.
- Planned restarts — updates or maintenance cause brief “closing transmission channel” replies.
- Rate limits — a provider slows a sender that opens too many connections or sends too fast.
- Greylisting — a server delays first-time senders and expects a retry.
- Reputation blocks — a temporary block tied to IP history, content flags, or authentication gaps.
Fixing Error 421 In Web Requests With Minimal Guessing
Start by proving whether the server is rejecting a reused connection. If you can reproduce the failure on one connection and make it succeed on a fresh connection, you’ve narrowed the cause fast.
Steps for developers and site owners
- Capture the failing request — record the URL, the Host header, and the response headers; keep the exact time and the server or edge node if it’s logged.
- Force a new connection — retry with a tool that can disable connection reuse; with curl, add
--http1.1to bypass HTTP/2 and see if 421 vanishes. - Verify DNS to IP mapping — confirm the hostname resolves to the IP your client reached; check both IPv4 and IPv6 if you publish AAAA records.
- Confirm TLS SNI and certificate — run an SNI test against the IP and make sure the certificate chain matches the hostname you request.
- Inspect proxy host routing — in Nginx, Apache, or a gateway, confirm the vhost/server_name matches the Host header and forwards to the correct upstream.
- Check edge consistency — if you use a CDN or load balancer, compare configs across nodes; a single stale node can cause “only sometimes” 421s.
In browsers, a hard refresh can clear a stale pooled connection. In API clients, set a lower keep-alive or disable HTTP/2 for that host until the edge config is clean again.
Fast checks that fix a lot of real 421 cases
- Disable origin coalescing — if your stack reuses HTTP/2 connections across hostnames, turn off coalescing where you can, or split origins by certificate and IP.
- Align certificates and host rules — make sure every hostname you serve is listed on the certificate on every node that can receive that traffic.
- Harden default server behavior — set a clear default vhost that returns a clean 404 or 421 with logging, so misroutes are easy to see.
- Pin upstream selection — route by Host header early, not by a guessed default upstream, so each site lands where it belongs.
If you run an API behind a gateway, add logging for the “authority” and SNI name at the edge. When a 421 happens, you want one line that tells you what name the client asked for and what config block answered.
Fixing Error 421 In Email Delivery Without Burning Your Sender
SMTP 421 means the remote side didn’t accept the message on this attempt. In many setups, the right move is to slow down and let the queue retry. If you keep hammering the same domain, you can extend the block.
Steps for senders using an SMTP relay or ESP
- Read the full bounce line — keep the enhanced status code (the 4.x.x part) and any extra text like “closing transmission channel” or “try again later.”
- Check retry behavior — confirm your system re-queues soft bounces and uses backoff; look for a retry window that matches the recipient’s typical delay.
- Watch connection rate — lower concurrent SMTP connections per domain and reduce burst sending; many providers trigger 421 when too many sessions open at once.
- Verify authentication — confirm SPF passes for your envelope-from domain and DKIM signatures validate; add DMARC alignment if you control the domain.
- Review content triggers — remove link shorteners, mismatched From names, and heavy image-only layouts; keep a clean text-to-HTML balance.
- Check IP and domain history — look for recent spikes, new sending IPs, or sudden list changes that can trip temporary blocks.
Steps for admins on the receiving side
- Confirm service health — check SMTP daemon uptime, disk space, and queue depth; a full disk or stuck queue can cause 421 responses.
- Review connection limits — tune rate limits so you reject abusive bursts without blocking normal partners; log when throttles fire.
- Check TLS and certificates — mismatched certs can trigger odd client behavior and repeated reconnects; keep cert chains current.
- Audit greylisting rules — if you use greylisting, confirm retries are accepted after the delay and that your delay is not too long for common senders.
- Look for upstream outages — spam filters, DNS resolvers, and storage backends can fail and cause the SMTP front end to shed load.
When you can, map 421 spikes to a time window. If they cluster at a predictable hour, that points to scheduled jobs, backups, or traffic peaks instead of a content issue.
Logs And Tests That Pinpoint The Root Cause
A 421 is a symptom, not a diagnosis. The fastest wins come from choosing one test that changes only one variable, then reading what changes in the outcome.
Web testing checklist
- Repeat with HTTP/1.1 — if the error disappears, suspect HTTP/2 reuse, coalescing, or edge routing tied to connection state.
- Repeat from a second network — if only one ISP or region sees it, suspect a CDN PoP node, DNS geo answers, or IPv6-specific routing.
- Hit the origin directly — resolve the hostname to the origin IP in your hosts file or via curl
--resolveand compare behavior. - Compare certificate on each IP — run an SNI check against every A/AAAA record to make sure none serve a stray cert or default site.
Email testing checklist
- Inspect enhanced status codes — 4.3.2 often points to service shutdown or overload; 4.7.x often points to policy or throttling.
- Check queue timing — measure how long it takes for a retry to succeed; that hints at greylisting windows or rate-limit cooldowns.
- Validate SPF and DKIM results — run a test send to a mailbox you control and confirm authentication passes end to end.
- Track per-domain rates — plot bounces by recipient domain; one domain spiking suggests throttling, while many domains suggest a sender-side issue.
Prevention Habits That Keep 421 From Coming Back
Once you clear a 421, it’s worth adding small guardrails so it doesn’t reappear the next time you rotate a cert, add a domain, or run a bigger send.
Web-side guardrails
- Keep host inventories aligned — every hostname in DNS should exist in your edge config, your TLS certificate list, and your origin routing table.
- Deploy config in one path — use a single pipeline for edge and origin changes so one node doesn’t lag behind.
- Monitor by hostname — alert on spikes of 421 per host and per edge node so “only one domain” issues are visible fast.
- Limit cross-host connection reuse — if you serve many domains, prefer separate certs or separate IPs for high-traffic names.
Email-side guardrails
- Send with steady pacing — keep a predictable rate and avoid sharp bursts that trigger throttles.
- Maintain clean lists — remove repeated soft bounces and stop mailing recipients that never accept mail.
- Align identity — keep From, envelope-from, and DKIM signing aligned so receivers see a consistent sender.
- Keep retry windows sane — short retries can look like abuse; longer backoff is gentler on receiving servers.
Reference links
- Read the HTTP definition — RFC 9110 (HTTP Semantics)
- Read the SMTP definition — RFC 5321 (SMTP)
- See a web-focused summary — MDN: 421 Misdirected Request
When you run into the 421 error code again, start with the “which protocol is this” check, then do one test that forces a new path. That small habit keeps the fix grounded and fast.
