HTTP 416 Range Not Satisfiable — Invalid Byte Range Request
About HTTP 416 Range Not Satisfiable
HTTP 416 Range Not Satisfiable means the server cannot serve the requested byte range because it falls outside the actual size of the resource. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: Occurs when the Range header specifies bytes beyond the resource's total size. Example: requesting bytes 1000-2000 of a file that is only 500 bytes. The response includes Content-Range header showing the actual resource size. Can happen when resuming a download of a file that was replaced with a smaller version. Also triggered by invalid range syntax in the Range header. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Requesting a byte range that exceeds the file size. Resuming download of a file that has been modified or replaced since last request. Malformed Range header syntax (e.g., bytes=abc-def). CDN serving cached file size that differs from origin. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Check the Content-Range header in the response for the actual file size. Reset your download and start from byte 0 instead of resuming. Validate Range header syntax: Range: bytes=0-499 or Range: bytes=500-. Use a HEAD request first to get Content-Length before requesting ranges. Clear CDN cache if file size recently changed on origin. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our HTTP Status Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
Why does my resumed download fail with 416?
The file on the server changed since your partial download. Start the download over from the beginning.
Overview
HTTP 416 Range Not Satisfiable means the server cannot serve the requested byte range because it falls outside the actual size of the resource.
Key Details
- Occurs when the Range header specifies bytes beyond the resource's total size
- Example: requesting bytes 1000-2000 of a file that is only 500 bytes
- The response includes Content-Range header showing the actual resource size
- Can happen when resuming a download of a file that was replaced with a smaller version
- Also triggered by invalid range syntax in the Range header
Common Causes
- Requesting a byte range that exceeds the file size
- Resuming download of a file that has been modified or replaced since last request
- Malformed Range header syntax (e.g., bytes=abc-def)
- CDN serving cached file size that differs from origin
Steps
- 1Check the Content-Range header in the response for the actual file size
- 2Reset your download and start from byte 0 instead of resuming
- 3Validate Range header syntax: Range: bytes=0-499 or Range: bytes=500-
- 4Use a HEAD request first to get Content-Length before requesting ranges
- 5Clear CDN cache if file size recently changed on origin