4164xx
4xx — Client Error
Range Not Satisfiable
The range specified by the Range header field in the request cannot be fulfilled.
What it means
The HTTP 416 Range Not Satisfiable error response code indicates that a server cannot serve the requested ranges. The most likely reason is that the document doesn't contain such ranges, or that the `Range` header value, though syntactically correct, doesn't make sense.
How it works
- 1A client requests a 1000-byte file.
- 2The client sends a `Range: bytes=2000-3000` header.
- 3The server sees that the requested range is completely outside the bounds of the file.
- 4The server returns 416.
Why you're seeing this
- • The requested byte range is beyond the end of the file.
How to fix it
- • Clients should verify the file size (via a HEAD request) before requesting specific byte ranges, or start over from byte 0.
Framework Implementations
Node.js (fs)
if (start >= fileSize) {
res.writeHead(416, { 'Content-Range': `bytes */${fileSize}` });
return res.end();
}Real-Life Scenarios
Use this when implementing file streaming or resumable downloads if the client asks for bytes that don't exist.
Bad Download Resume
A download manager tries to resume a file at byte 500, but the file on the server was updated and is now only 200 bytes long. The server returns 416.
HTTP Transaction
1. Client Request
GET /video.mp4 HTTP/1.1 Range: bytes=50000-60000
2. Server Response
HTTP/1.1 416 Range Not Satisfiable Content-Range: bytes */10000
SEO Implications
None.