---
description: Learn how Cloudflare processes HTTP range requests and what origin responses must include.
title: Range request behavior
image: https://developers.cloudflare.com/cache/reference/range-requests/og.png?v=ed9b3d289f26e59e
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/cache/llms.txt  
> Use this file to discover all available pages before exploring further.

# Range request behavior

Last updated Sep 14, 2026|Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/cache/reference/range-requests/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

Cloudflare can serve HTTP range requests from complete or partial cached files. [Origin Range Requests](https://developers.cloudflare.com/cache/how-to/cache-rules/settings/#origin-range-requests) let Cloudflare fetch eligible files from your origin in cache-aligned byte ranges.

## Request eligibility

Cloudflare uses the partial-file path only for a `GET` request that is eligible for caching when the request arrives. The origin response may later prove uncacheable. In that case, Cloudflare can still use origin range fetching, but does not store the response bytes.

`HEAD` requests and other methods do not use this path.

### HEAD requests

A `HEAD` request containing `Range` can return `200 OK`, `206 Partial Content`, `304 Not Modified`, or `416 Range Not Satisfiable`. A `HEAD` response never has a body. A `206 Partial Content` response includes `Content-Range`. When Cloudflare serves a complete cached file without Origin Range Requests, a matching `If-Range` validator can preserve a `206 Partial Content` response, while a mismatch returns `200 OK`. Cloudflare ignores `If-Range` for other `HEAD` request paths.

## Client response behavior

### Requests without Range

A successful, unconditional `GET` without `Range` returns the complete file as `200 OK`. On a cold cache miss, the first origin request also omits `Range`.

If only part of the file is cached, Cloudflare may request the missing bytes from the origin. The client still receives one complete `200 OK` response.

### One valid range

The following requests return `206 Partial Content` when successful:

- `Range: bytes=100-199`
- `Range: bytes=100-`
- `Range: bytes=-100`

Cloudflare shortens an end position that exceeds the file size. A suffix range larger than the file returns the complete file as `206 Partial Content`.

### Unsatisfiable ranges

Cloudflare returns `416 Range Not Satisfiable` for:

- An empty range, such as `bytes=`
- A zero-length suffix, such as `bytes=-0`
- Inverted range bounds
- A range starting at or beyond the end of the file
- A range against an empty, uncompressed file
- Overlapping or out-of-order ranges when Origin Range Requests applies

A Cloudflare-generated `416 Range Not Satisfiable` response has an empty body. It includes `Content-Range: bytes */<FILE_SIZE>`.

When Cloudflare serves a complete cached file without Origin Range Requests, it ignores overlapping or out-of-order ranges and normally returns the complete file as `200 OK`.

### Ignored Range headers

Cloudflare processes the request as a non-range request when:

- The range syntax cannot be parsed
- The range unit is not `bytes`
- A number is too large to parse
- The header contains more than 300 ranges, or exactly 300 ranges when Cloudflare serves a complete cached file without Origin Range Requests

This normally returns the complete file as `200 OK`. Conditional requests can return `304 Not Modified`, and origin errors still apply.

### Multiple ranges

When Origin Range Requests applies, between two and 300 valid, ascending, non-overlapping ranges return a multipart `206 Partial Content` response. Cloudflare omits individual ranges that cannot be satisfied. The response remains multipart if only one range remains. If no ranges remain, Cloudflare returns `416 Range Not Satisfiable`.

When Cloudflare serves a complete cached file without Origin Range Requests, one remaining satisfiable range produces a single-range `206 Partial Content` response.

### Conditional requests

`If-None-Match` and `If-Modified-Since` take precedence over `Range`. They can produce a `304 Not Modified` response.

Otherwise, an `If-Range` value that exactly matches the cached `ETag` or `Last-Modified` value preserves range behavior. A mismatch causes Cloudflare to ignore `Range` and use the complete-response path.

### Decompression

If Cloudflare must decompress a complete encoded response, it ignores `Range`. Cloudflare sends the complete, uncompressed body as `200 OK`. This applies to cached responses and responses received from the origin.

A range request for an empty, encoded response returns an empty `200 OK`, not `416 Range Not Satisfiable`.

## Origin request behavior

Cloudflare aligns origin range requests to 1 MiB cache boundaries. For example, if a client requests a 1 KiB range, Cloudflare may fetch a 1 MiB range from your origin and return only the requested 1 KiB to the client. Cloudflare may also split one client request into several single-range origin requests. The `Range` values seen by your origin can differ from the client's header. Consider this behavior when configuring origin logs, request limits, rate limits, or request signing.

Cloudflare adds `Accept-Encoding: identity` to every origin request generated by Origin Range Requests. This includes a complete-file `GET` handled by the feature. It does not disable normal compression between Cloudflare and the client.

### Partial response requirements

For Cloudflare to cache an origin `206 Partial Content` response, the response must meet these requirements:

| Response field | Requirement |
| --- | --- |
| `Content-Encoding` | The response must be unencoded. |
| `Content-Range` | Include a concrete range. Its start must match Cloudflare's request. Its end must match the requested end or the end of the file, whichever comes first. Include the complete file size. |
| `Content-Length` | Include a numeric value equal to the returned interval length. |
| `Transfer-Encoding` | Omit this header. |
| `ETag` | Optional. If present, its presence and exact value must remain consistent across responses for the same cached representation. |

The complete file size must also remain consistent across responses. Violations can prevent caching or end responses served to the client early.

### Origin responses that do not honor Range

If the origin ignores a Cloudflare-generated `Range` header and returns a complete `200 OK`, Cloudflare can use the response. Cloudflare must download the complete file and may then return the requested range to the client.

If the origin returns an encoded `206 Partial Content` response, Cloudflare does not cache it. Before the client response starts, Cloudflare may send that single response without caching. After the response starts, Cloudflare ends it early, and the client receives fewer bytes than promised.

Other incompatible origin responses during a response assembled from several requests can also end the client response early.

## Caching limitations

Origin Range Requests do not make an otherwise ineligible request or response cacheable. Cloudflare checks the [maximum cacheable file size](https://developers.cloudflare.com/cache/concepts/default-cache-behavior/#cacheable-size-limits) against the complete size from `Content-Range`. Requesting a small range does not bypass this limit.

Origin Range Requests are not supported with [Cache Reserve](https://developers.cloudflare.com/cache/advanced-configuration/cache-reserve/#limits).

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/cache/reference/range-requests/#page","headline":"Range request behavior","description":"Learn how Cloudflare processes HTTP range requests and what origin responses must include.","url":"https://developers.cloudflare.com/cache/reference/range-requests/","inLanguage":"en","image":"https://developers.cloudflare.com/cache/reference/range-requests/og.png?v=ed9b3d289f26e59e","dateModified":"2026-09-14","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
