HTTP
416 - Range Not Satisfiable
HTTP 416 Range Not Satisfiable means requested byte ranges cannot be served for the selected representation.
Last reviewed: February 12, 2026|Editorial standard: source-backed technical guidance
What Does Range Not Satisfiable Mean?
Partial content retrieval failed because requested byte ranges do not map to the current representation, so resumable reads break until offsets are corrected.
Common Causes
- -Requested range starts beyond end of current representation.
- -Client uses stale offsets after resource size changed.
- -Range header syntax is invalid or unsupported by endpoint.
How to Fix Range Not Satisfiable
- 1Fetch current object length (for example via `HEAD`) and rebuild `Range` header within valid bounds.
- 2Reset stale resume offsets when resource size/version changed since previous download attempt.
- 3Use single-range requests first to isolate range-calculation defects before multi-range optimization.
Step-by-Step Diagnosis for Range Not Satisfiable
- 1Capture the exact `Range` header sent and the response metadata returned with 416.
- 2Verify current representation length and compare it against requested byte intervals.
- 3Check for stale resume metadata after upstream resource replacement or truncation.
- 4Retest with a known-valid range (`bytes=0-1023`) and then expand range logic incrementally.
Range Math and Representation Length Validation
- -Validate computed offsets against current size (example: client asks `bytes=10485760-` for a 6 MB file).
- -Inspect inclusive end-range calculations to avoid off-by-one errors (example: requesting `0-1024` for a 1024-byte object).
Resume State and Version Drift Trace
- -Correlate resume checkpoints with object version changes (example: file replaced, old checkpoint now points past end).
- -Check caching and CDN behavior for stale metadata (example: cached `Content-Length` no longer matches origin object).
Implementation Examples
Reproduce HTTP 416 Range Not Satisfiablecurl
curl -i -X GET https://api.example.com/v1/resource -H "Range: bytes=9999999-10000000"
# Response:
# HTTP/1.1 416 Range Not Satisfiable
# {"error":"Range Not Satisfiable","code":"416"}Handle 416 in JavaScriptjavascript
const response = await fetch('https://api.example.com/v1/resource', {
method: 'GET',
headers: { 'Accept': 'application/json', 'Range': 'bytes=9999999-10000000' }
});
if (response.status === 416) {
console.error('Handle 416 Range Not Satisfiable');
}Handle 416 in Pythonpython
import requests
response = requests.get(
'https://api.example.com/v1/resource',
headers={'Accept': 'application/json', 'Range': 'bytes=9999999-10000000'}
)
if response.status_code == 416:
print('Handle 416 Range Not Satisfiable')How to Verify the Fix
- -Repeat resumable reads and confirm valid ranges return expected partial content paths.
- -Run boundary tests for first byte, last byte, and end-of-file resume offsets.
- -Confirm clients recover gracefully by resetting offsets when server signals invalid range.
How to Prevent Recurrence
- -Store and validate resource length/version metadata before issuing resumed range requests.
- -Add integration tests for resume logic across file replacement and truncation scenarios.
- -Standardize range-header builders to avoid manual offset arithmetic in clients.
Pro Tip
- -persist ETag alongside resume offset and restart from byte 0 whenever ETag changes to avoid cross-version range corruption.
Decision Support
Official References
Provider Context
This guidance is specific to HTTP services. Always validate implementation details against official provider documentation before deploying to production.