# HTTP 414 URI Too Long — Meaning, Causes & Fixes

> The URL is longer than the server is willing to process.

414 means the request target — the path plus the query string — is longer than the server allows. Common limits sit around 8 KB: nginx's `large_client_header_buffers` defaults to 8k per line and Apache's `LimitRequestLine` to 8190 bytes. The usual culprit is data in the query string that belongs in a request body.

- Class: 4xx Client Error
- Retry: No — change the request first
- Cacheable by default: yes
- Defined in: [RFC 9110 §15.5.15 — 414 URI Too Long](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.15)

## Example response

```http
HTTP/1.1 414 URI Too Long
Content-Type: application/json
Content-Length: 24

{"error":"URI Too Long"}
```

## Common causes

- Huge query strings: long id lists, filters, or base64 data in the URL.
- Redirect loops that append a parameter on every hop.
- Forms using GET with very large fields.

## How to fix it

1. Move large inputs into a POST body.
2. Fix redirect loops that keep growing the URL.
3. Raise `large_client_header_buffers` (nginx) or `LimitRequestLine` (Apache) only if long URLs are genuinely needed.

## Send a 414 from your server

### Express

```
res.status(414).json({ error: "URI Too Long" });
```

### Next.js route handler

```
return Response.json({ error: "URI Too Long" }, { status: 414 });
```

### Flask

```
return {"error": "URI Too Long"}, 414
```

### Go net/http

```
http.Error(w, "URI Too Long", http.StatusRequestURITooLong)
```

### nginx

```
return 414;
```

## FAQ

### What is the maximum URL length?

HTTP sets no fixed limit; RFC 9110 recommends supporting at least 8,000 octets. Browsers handle far longer URLs, but servers, proxies and CDNs commonly cap around 8 KB, so stay well below that.

## Related status codes

- [413 Content Too Large](https://www.devkult.com/http/413.md)
- [431 Request Header Fields Too Large](https://www.devkult.com/http/431.md)
- [400 Bad Request](https://www.devkult.com/http/400.md)

Open the interactive page: https://www.devkult.com/http/414