HTTP status code 416 Range Not Satisfiable occurs when a client requests a byte range that the server cannot provide. This usually happens when the requested range is outside the size of the target resource.
Range request headerContent-Range in responseClients use the Range header to request partial content. If the range exceeds the file size, the server responds with 416.
// Requesting bytes beyond file size
GET /video.mp4 HTTP/1.1
Host: example.com
Range: bytes=999999-1000000
// Node.js example sending 416 response
res.status(416).set("Content-Range","bytes */5000").end();
The server rejects the request because the range does not exist within the resource size. The client should retry with a valid byte range.
Imagine a file that is 1000 bytes long (indices 0-999). Use the simulator below to test different ranges.
? Request Simulator
Content-Range for debugging