What does HTTP 413 mean?
The request body is larger than the server allows. Formerly “Payload Too Large”. Nginx returns it when an upload exceeds client_max_body_size (1 MB by default), and PHP-based sites when upload_max_filesize or post_max_size is too small.
4xx Client error: The request has a problem the client can fix: wrong URL, missing credentials, bad data or too many requests.
Common causes of a 413 error
- Uploading a file larger than the configured limit.
- Nginx default
client_max_body_size 1m.
How to fix 413 Content Too Large
- Compress or resize the file before uploading.
- Raise
client_max_body_sizein Nginx orLimitRequestBodyin Apache, and PHP’s upload limits.
413 and SEO
Not relevant for crawling.
Example response
HTTP/1.1 413 Content Too Large
How to return a 413 response
Node.js (Express)
res.status(413).json({ error: 'Content Too Large' });PHP
http_response_code(413);Python (Flask)
return {'error': 'Content Too Large'}, 413Go (net/http)
w.WriteHeader(413)nginx
return 413;
Related status codes
- 400 Bad Request — The server cannot process the request because it is malformed.
- 414 URI Too Long — The URL is longer than the server is willing to process.
- 431 Request Header Fields Too Large — The request headers, or a single header, are too large.
Check which status code a URL returns with the HTTP header checker.
Perguntas frequentes
What does status code 413 mean?
How do I fix a 413 error?
client_max_body_size in Nginx or LimitRequestBody in Apache, and PHP’s upload limits.