HTTP Status Code 414 = “URI Too Long”
The server refuses to process the request because the URL (URI) is too long.
Common causes
- Extremely long query parameters
- Sending large data using
GETinstead ofPOST - Redirect loops
- Tracking parameters appended repeatedly
- Encoding issues
- Infinite URL generation bug Example
Problematic URL
text id=”j7m2qx”
https://example.com/search?q=very-long-data……..
Server response
http id=”v3k9we”
HTTP/1.1 414 URI Too Long
Common scenario
Using GET for large payloads:
http id=”n5p8zd”
GET /api/users?data=HUGE_JSON_DATA
Instead, use:
http id=”q2w7ra”
POST /api/users
Fixes
1. Use POST instead of GET
Bad
js id=”u8m4xc”
fetch(‘/api?hugeData=…’)
Better
js id=”k1v9yt”
fetch(‘/api’, {
method: ‘POST’,
body: JSON.stringify(data)
})
2. Reduce query string size
- Remove unnecessary parameters
- Compress/filter data
- Avoid sending arrays in URL
3. Fix redirect loops
Example:
text id=”r4p2ne”
A → B → A → B
This can continuously increase URL length.
4. Increase server limits (if needed)
Nginx
nginx id=”w7q3kd”
large_client_header_buffers 4 16k;
Apache
apache id=”m9x1vb”
LimitRequestLine 16384
Browser limitations
Different browsers and servers have maximum URL lengths.
Approximate limits:
| Browser/Server | Typical Limit |
| — | – |
| Chrome | ~2 MB |
| Apache | ~8 KB |
| Older browsers | ~2 KB |
Difference between 413 and 414
| Code | Meaning |
| — | – |
| 413 | Request body too large |
| 414 | URL/URI too long |
Related HTTP status codes
| Code | Meaning |
| — | – |
| 400 | Bad Request |
| 404 | Not Found |
| 413 | Payload Too Large |
| 414 | URI Too Long |
| 431 | Request Header Fields Too Large |