4xx

416 Range Not Satisfiable

The requested byte range is outside the bounds of the resource.

What is HTTP 416?

This status code, previously known as 'Requested Range Not Satisfiable', indicates that the Range header in the request specified a range that the server cannot provide. This usually means the range extends beyond the end of the resource. The response should include a Content-Range header indicating the actual length of the resource. This commonly occurs when resuming downloads where the file has changed or the offset is incorrect.

Defined in RFC 9110

Common Causes

  • Requesting bytes beyond the end of a file, such as bytes 1000-2000 of a 500-byte file
  • Resuming a download with an offset that exceeds the current file size because the file was modified
  • Malformed Range headers with incorrect syntax or invalid byte ranges
  • The requested resource was replaced with a shorter version since the range was calculated

How to Fix

  • Check the Content-Range header in the response to learn the actual resource size
  • Re-fetch the resource from the beginning if the range is no longer valid
  • Verify the Range header syntax follows the format: bytes=start-end
  • For download resumption, validate the file has not changed before requesting a range