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. The specification sets no maximum, and recommends that senders and recipients support URIs of at least 8000 octets. 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.

Browsers and search tooling add caps of their own. Chromium refuses URLs longer than 2 MB, and the sitemap protocol requires each listed URL to stay under 2,048 characters, so URLs beyond the sitemap cap stay out of sitemaps even when the server accepts them.

The 414 URI Too Long response is cacheable by default.

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. Reload nginx to apply.

Apache: Set LimitRequestLine in httpd.conf to a higher byte value. The default is 8190 bytes. 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. Request filtering answers an over-long URL with a 404 rather than 414, logging substatus 404.14 for the URL and 404.15 for the query string, so the IIS log rather than the client shows the real cause. 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

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

Last updated: November 3, 2026