What 416 Range Not Satisfiable means
416 Range Not Satisfiable means the client sent a Range header asking for bytes that do not exist in the resource. Most commonly: requesting bytes 5000-6000 of a file that is only 4000 bytes long. The response should include a Content-Range header indicating the actual size, so the client can adjust and retry.
When servers should return it: Return 416 when the Range header asks for bytes outside the resource bounds.
Common causes
- Resume of a download where the file changed size
- Client miscomputed the range
- Off-by-one in Range header construction
How to fix 416 Range Not Satisfiable
- Re-fetch the resource size with HEAD or a 0-byte range
- Recompute the range based on the current size
- For resumable downloads, store the original size and verify before resuming
Example response
curl -i -H "Range: bytes=10000-20000" https://example.com/small.txt
HTTP/2 416
content-range: bytes */500
content-type: text/plain
Range out of bounds
More references
For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.