414 URI Too Long
The 414 URI Too Long status code indicates the URI in the request exceeds the length the server is willing to process. The code was previously named "Request-URI Too Long" before being renamed to "URI Too Long".
Usage
When the 414 URI Too Long error message is received, the client understands the server expects a smaller HTTP path or address. While the specification does not stipulate any requirement for length, in practice, servers and reverse proxies cap the request line to protect memory and block certain types of attacks.
Servers, reverse proxies, and frameworks each impose their own URI length limits. Common defaults range from 4 KB to 8 KB, though no specification defines a maximum.
The 414 URI Too Long response is cacheable by default.
SEO impact
Search engines like Google will not index a URL with a 414 response status. URLs previously indexed will be removed from search results.
Example
The client requests a resource using a URI beyond what the server allows.
Request
GET /<...a_long_URI...> HTTP/1.1
Host: www.example.re
Response
HTTP/1.1 414 URI Too Long
How to fix
The most common cause is a GET request with too many query parameters or excessively long values encoded in the URL. A redirect loop or misconfigured rewrite rule appending parameters on each cycle also triggers this error.
Client-side fixes:
- Shorten the URL by removing unnecessary query parameters
- Move large parameter sets to the request body using POST instead of GET
- Avoid encoding large data structures (JSON blobs, Base64 strings) in the query string
- Check for redirect loops adding parameters on each redirect cycle
nginx: Increase large_client_header_buffers
to allow longer request lines. The directive takes
two values: buffer count and buffer size, e.g.
large_client_header_buffers 4 32k. Restart nginx
to apply.
Apache: Set LimitRequestLine in httpd.conf
to a higher byte value. The default is 8190 bytes.
Values up to 128000 are common for applications with
long URLs. Restart Apache after the change.
IIS: Edit maxUrl and maxQueryString in the
web.config file under system.webServer > security > requestFiltering > requestLimits. The
defaults are 4096 bytes for URL length and 2048
bytes for query strings. Keep these values as low as
practical. Large URL limits increase exposure to
injection attacks.
When the error appears in a browser rather than an API, the URL itself is the culprit. Redirect loops appending parameters on each pass grow the request line until the server rejects it. Oversized Cookies instead produce 400 or 431, since cookies travel in header fields rather than the request line.
Code references
.NET
HttpStatusCode.RequestUriTooLong
Rust
http::StatusCode::URI_TOO_LONG
Rails
:uri_too_long
Removed symbol
The older :request_uri_too_long symbol was
dropped when Rack renamed 414 to "URI Too
Long" in Rack 1.6.0, and raises an
ArgumentError in current Rack versions. Use
:uri_too_long.
Go
http.StatusRequestURITooLong
Symfony
Response::HTTP_REQUEST_URI_TOO_LONG
Python3.13+
http.HTTPStatus.URI_TOO_LONG
Python 3.13 renamed the constant to URI_TOO_LONG
to match the current status text. The former
REQUEST_URI_TOO_LONG name remains available as a
backward-compatible alias and is the only name on
Python 3.5 through 3.12.
Java
java.net.HttpURLConnection.HTTP_REQ_TOO_LONG
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_REQUEST_URI_TOO_LONG
Angular
@angular/common/http/HttpStatusCode.UriTooLong
See also
- RFC 9110: HTTP Semantics
- Google: HTTP status codes and network errors
- GET
- HTTP status codes
- HTTP headers