HTTPfy

413 Content Too Large

The request body is larger than the server is willing to process.

413 at a glance

Code
413
Name
Content Too Large
Class
4xx Client error
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.5.14
Cacheable by default
No by default. Caches store it only when the response carries explicit freshness (Cache-Control max-age, s-maxage or Expires).

What 413 means

413 Content Too Large (formerly "Payload Too Large" and "Request Entity Too Large") means the body exceeds a server limit. If the limit is temporary, the server can send Retry-After. Many servers close the connection after a 413 because the rest of the body would otherwise have to be read.

What typically causes a 413

  • nginx client_max_body_size, which defaults to only 1 MB ("413 Request Entity Too Large").
  • Apache LimitRequestBody; PHP upload_max_filesize/post_max_size (PHP usually reports these differently, but proxies return 413).
  • Cloudflare upload limits by plan (100 MB on Free and Pro).
  • AWS API Gateway (10 MB payload limit) and Lambda payload limits.
  • Ingress controllers: ingress-nginx annotation nginx.ingress.kubernetes.io/proxy-body-size.

Fix it on the server

  • Raise the limit at every layer: CDN, load balancer, ingress, web server and application framework.
  • For large files, use direct-to-storage uploads (S3 presigned URLs) or chunked/resumable uploads.

Fix it as a client or visitor

  • Compress or split the upload; for files, use the service's multipart or resumable upload API.

Headers that go with 413

HeaderRole
Retry-AfterOnly if the condition is temporary.
ConnectionOften close.

Example response

HTTP/1.1 413 Content Too Large
Server: nginx
Content-Type: text/html
Connection: close

<title>413 Request Entity Too Large</title>

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.