414
HTTPERRORNotable4xx Client ErrorHIGH confidence

URI Too Long

Production Risk

Low. Most browsers and servers have very high limits (often 8KB or more), so this error is rare in normal operation. If it occurs, it almost always points to a client-side bug.

What this means

The URI requested by the client is longer than the server is willing to interpret. This is a rare condition which is only likely to occur when a client has improperly converted a POST request to a GET request with long query information.

Why it happens
  1. 1A client passes a huge amount of data in the query parameters of a GET request.
  2. 2A redirect loop accidentally creates a progressively longer and longer URL.
  3. 3A client is trying to exploit a potential buffer overflow vulnerability.
How to reproduce

A search form incorrectly uses a GET request, placing many kilobytes of filter data into the URL's query string.

trigger — this will error
trigger — this will error
GET /search?q=... (imagine several kilobytes of data here)

expected output

HTTP/1.1 414 URI Too Long

Fix 1

Use POST for Large Data

WHEN Sending complex or large amounts of data to the server.

Use POST for Large Data
Change the client to send the data in the request body using a POST request instead of in the URL.

Why this works

Client-Side Correction

Fix 2

Increase Server's URI Limit

WHEN You control the server and long URIs are unavoidable (and safe).

Increase Server's URI Limit
// Nginx example in nginx.conf
large_client_header_buffers 4 16k;

Why this works

Server Configuration

Version notes

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All HTTP errors