414 URI Too Long

The address is longer than the server will process.

Code
414
Reason phrase
URI Too Long
Class
4xx Client error
Defined in
RFC 9110 section 15.5.15
Cacheable by default
Yes

What it means

Client error: the problem lies with the request. Repeating it unchanged will normally fail again.

When a server should send it. When the URL, usually its query string, is longer than the server will parse. Servers set the limit: nginx and Apache allow about 8 KB per request line by default.

Common causes. Huge query strings, often from a form using GET for lots of data, or a redirect loop that keeps adding parameters.

What to do. Send the data with POST in the body instead.

How clients and crawlers treat it

Browsers and HTTP clients. Browsers can send very long URLs, so the limit is almost always the server or proxy. It is cacheable by default.

Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.

Caching. Cacheable by default (RFC 9110 section 15.1). With no Cache-Control or Expires header, a cache may still store it and reuse it for a heuristic period, often 10% of the time since Last-Modified, so set Cache-Control explicitly if that is not what you want.

Example response

HTTP/1.1 414 URI Too Long
Content-Type: text/plain; charset=utf-8

URI Too Long

How to send 414

nginx
location /example {
    return 414;
}
Apache (.htaccess)
RewriteEngine On
RewriteRule ^example$ - [R=414,L]
PHP
http_response_code(414);
echo 'URI Too Long';
exit;
Node.js
res.writeHead(414, { 'Content-Type': 'text/plain' });
res.end('URI Too Long');
Python (Flask)
# in a view function
return 'URI Too Long', 414

Change the paths to suit. In nginx, add_header needs always to apply to error responses.

Related codes

All status codes · All 4xx codes

Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.