# 416 Range Not Satisfiable

> https://http-status.org/docs/416

**Family:** 4xx Client Error

## Rationale

The requested Range cannot be fulfilled; it's outside the target size.

## In Plain Terms

You asked for a specific part of a file (like pages 50-60), but the file only has 10 pages. I can't give you what doesn't exist.

## Description

The HTTP 416 Range Not Satisfiable status code indicates that none of the ranges in the request's Range header field overlap the current extent of the selected resource.

## Server Perspective

### Usage
- Return 416 when the requested byte range falls outside the current representation length
- Use it only when range handling is relevant for the target resource
- Range request beyond file size
- Invalid byte range specifications
- Start position greater than file length
- Malformed Range headers

### Implementation
- Include Content-Range in the form bytes */<complete-length>
- Expose Accept-Ranges when you want clients to know range requests are supported

### Common Headers
- Content-Range
- Accept-Ranges

### Body
- Include Content-Range with the current representation length when possible so the client can correct its range.

### Pitfalls
- Do not use 416 when there was no meaningful Range request to evaluate
- Do not omit the complete length when it is available
- Valid range requests (use 206 Partial Content)
- No Range header provided (use 200 OK)
- Server doesn't support ranges (use 200 OK)

## Client Perspective

### Pitfalls
- Do not interpret 416 as a generic download failure without checking Content-Range

## Examples

### Range beyond file size

Requested range starts beyond the 50MB file size

**Request:**
```
GET https://api.example.test/video.mp4
Range: bytes=100000000-200000000
```

**Response:**
```
416 Range Not Satisfiable
Content-Range: bytes */50000000
Content-Type: application/json

{
  "error": "range_not_satisfiable"
}
```

## Related Codes

- [206 Partial Content](/docs/206.md)
- [200 OK](/docs/200.md)

