/codes/nginx/nginx-special-status-codes
nginx status codes 444, 499, 413 and 494-497
verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · nginx version: nginx/1.30.6updated 2026-10-20
- tool
- nginx
- versions
- nginx 1.x
- os
- any
Besides the standard HTTP codes, nginx uses a few codes of its own. They mostly appear in the access log, not in responses: 444 sends nothing at all, and 499 is logged when the client disconnected before nginx could answer.
nginx-specific codes
| Code | Meaning | What the client sees |
|---|---|---|
| 444 | return 444; closes the connection without sending a response | empty reply (curl exit 52) |
| 494 | request header too large (large_client_header_buffers) | 400 Bad Request |
| 495 | client certificate verification failed | 400 Bad Request |
| 496 | client did not send a required certificate | 400 Bad Request |
| 497 | plain HTTP request sent to an HTTPS port | 400 Bad Request |
| 499 | client closed the connection before the response | nothing (it already left) |
The 494–497 codes can be caught with error_page 497 https://$host$request_uri; to redirect plain HTTP on the TLS port.
444, 413 and 499 on a real nginx
mkdir -p logs temp
cat > slow.js <<'EOF'
const s = require("http").createServer((req, res) => setTimeout(() => res.end("late\n"), 2000));
s.listen(3911, "127.0.0.1");
setTimeout(() => process.exit(0), 5000);
EOF
cat > nginx.conf <<'EOF'
pid logs/nginx.pid;
events {}
http {
log_format short '$request_method $uri $status';
access_log logs/access.log short;
client_max_body_size 1k;
server {
listen 127.0.0.1:3912;
location /drop { return 444; }
location /upload { return 200 "stored\n"; }
location /slow { proxy_pass http://127.0.0.1:3911; }
}
}
EOF
node slow.js &
nginx -p . -c nginx.conf -e logs/error.log &
sleep 1
curl -s http://127.0.0.1:3912/drop; echo "curl exit status: $?"
head -c 4096 /dev/zero | curl -s -o /dev/null -w 'upload 4 KiB: %{http_code}\n' --data-binary @- http://127.0.0.1:3912/upload
curl -s --max-time 1 http://127.0.0.1:3912/slow; echo "curl exit status: $?"
sleep 1
nginx -p . -c nginx.conf -e logs/error.log -s stop
echo "--- access.log"; cat logs/access.logOutput
curl exit status: 52 upload 4 KiB: 413 curl exit status: 28 --- access.log GET /drop 444 POST /upload 413 GET /slow 499
413 Request Entity Too Large is a standard code (RFC 9110 calls it Content Too Large); nginx returns it when the body exceeds client_max_body_size, 1 MiB by default.
Sources
Related pages
codes · httpHTTP status codes: 1xx to 5xx with meaning and common causesHTTP status codes explained: 200 and 204, the redirects 301 to 308, client errors 400 to 429 and server errors 500 to 504, each with its most common cause.cheat sheets · nginxnginx cheat sheet: commands, server blocks, locations and proxyingnginx cheat sheet: test and reload, logs, server blocks, location matching order, reverse proxy headers, HTTPS redirects, static files and caching headers.config · nginxnginx proxy_pass with and without a trailing slashproxy_pass http://app without a path forwards the full URI; with a path like http://app/ nginx replaces the matched location prefix. Real requests shown.