416 Range Not Satisfiable
None of the ranges in the Range header overlap the current size of the resource.
Status
HTTP/1.1 416 Range Not Satisfiable
Details
- Category: 4xx
- Status: Standard. Registered with IANA and defined by a current standards-track RFC.
- Specification: RFC 9110 §15.5.17
- Cacheable: Only with explicit cache headers
- Response body: Allowed
- Retry: Retry only after changing the request
416 answers a range request that asks for bytes that do not exist, for example bytes 5000-6000 of a 2KB file. The response should carry Content-Range with the total size in the form bytes */length so the client can correct itself.
In resumable downloads it usually means the remote file changed or shrank since the transfer started. Sending If-Range with the original ETag avoids the problem: the server then returns the whole file instead of a mismatched slice.
Headers
- Content-Range: Should be sent as bytes */total so the client learns the real size.
Common causes
- A resumed download whose remote file was replaced with a smaller one.
- An off-by-one in range arithmetic, since ranges are inclusive on both ends.
- A zero-length resource, for which no range is satisfiable.
How to fix it
As the client
- Read the total size from Content-Range and re-request a valid range, or fetch the whole resource.
- Send If-Range with the stored ETag so a changed file returns a full 200 rather than failing.
As the server
- Include Content-Range: bytes */length on every 416.
- Ignore an unsatisfiable range and return 200 with the full body when that is more useful to clients.
Examples
GET /files/report.pdf HTTP/1.1 Host: files.example.com Range: bytes=900000-950000 HTTP/1.1 416 Range Not Satisfiable Content-Range: bytes */24576