Rule examples: DASH
MPEG-DASH delivers adaptive streaming through an XML manifest (.mpd) that references fragmented MP4 segments (.m4s). As with HLS, the manifest must stay fresh while segments can be cached a little longer. This page provides a template of cache rules and a CORS header rule tuned for DASH players such as dash.js.
These rules are for a standard property whose own origin already publishes DASH — the CDN caches and delivers those .mpd and .m4s files like any other files. Paradarum Live does not package DASH: managed live streams are delivered as HLS. See HLS rule examples and live playback and caching.
Manifest vs. segment TTLs
A live .mpd is updated as the presentation advances, so it needs a very short TTL. The .m4s segments are immutable once published and can be cached longer to offload the origin.
| File type | Pattern (case-insensitive regex) | TTL | Why |
|---|---|---|---|
| Manifest (MPD) | ~* \.(mpd)$ | 2 seconds | Must stay fresh; the live presentation advances. |
| Media segment | ~* \.(m4s)$ | 10 seconds | Immutable within the rolling window. |
DASH and HLS share the same caching philosophy: short TTL on the manifest, modest TTL on the segments. If you serve both protocols from one property, use the combined manifest pattern below so a single rule covers .m3u8 and .mpd.
Manifest cache rule
In the property's Rules tab, click Add cache rule and set:
- Pattern:
\.(mpd)$— Regex match type (case-insensitive) - TTL:
2seconds - Order:
1
Segment cache rule
Add a second cache rule for the segments:
- Pattern:
\.(m4s)$— Regex match type - TTL:
10seconds - Order:
2
The .m4s segment extension is shared by HLS (with fragmented MP4 / CMAF) and DASH. A single segment rule with pattern \.(ts|m4s)$ therefore covers both protocols when you serve them side by side.
Serving HLS and DASH together
If one property delivers both protocols from your origin, collapse the two manifest rules into one — a single cache rule with Pattern \.(m3u8|mpd)$ (Regex) and TTL 2 keeps every playlist fresh.
CORS header rule for dash.js
dash.js loads the manifest and segments over fetch/XHR, so the responses need a permissive CORS header. Add a response header rule:
- Action: Set
- Header name:
Access-Control-Allow-Origin - Header value:
* - Apply to: Response
- Pattern: empty (all requests)
Use a specific origin instead of * to restrict which sites may embed your dash.js player.
A note on Paradarum Live properties
Paradarum Live delivers streams as HLS, not DASH — so none of the rules on this page apply to a managed live stream. Its backing CDN property is created with its own read-only system rules (a manifest rule at TTL 2s, a ~* \.(ts|m4s)$ segment rule at TTL 10s, and an Access-Control-Allow-Origin: * CORS rule) that you cannot hand-edit. Use the templates here only for DASH that your own origin packages, on a standard property. See live playback and caching.
See also
- Rule examples: HLS — the equivalent rules for HLS playlists and segments.
- Live playback and caching — system rules on managed live properties.
- Cache rules and header rules — full references.