# HTTP 414 URI Too Long

**Code:** `414` · **Category:** HTTP · **Seen on:** Nginx, Apache

The request URL (usually the query string) is longer than the server will accept.

## Meaning

Servers cap URL length — around 8 KB in Nginx/Apache by default, and browsers/CDNs have their own limits. Long URLs usually come from stuffing data (filters, IDs, base64) into GET parameters or from redirect loops that keep appending parameters.

## Common causes

- Large data sent as GET query parameters (long ID lists, JSON, base64)
- Redirect loop appending `?next=` or `?redirect=` repeatedly
- Tracking parameters accumulating
- Search/filter UIs encoding all state into the URL

## Quick fix

1. Send large payloads in a POST body instead
2. Fix redirect loops that keep growing the URL
3. Store filter state server-side and pass a short ID
4. Raise server limits only as a last resort

## Detailed fix by platform

### Nginx

1. Raise header buffer (URL is part of the request line):

```nginx
large_client_header_buffers 4 32k;
```


### Apache

1. `LimitRequestLine 16384` in the server config (not .htaccess).

## How to diagnose

1. **Length** — How long is the URL?
2. **Content** — What is in the query string?
3. **Loop** — Is it growing on each redirect?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/http/414-uri-too-long)
