# .m3u8 MIME Type: application/vnd.apple.mpegurl

> HTTP Live Streaming playlists that point at video segments.

- MIME type: `application/vnd.apple.mpegurl`
- Extensions: .m3u8
- Also seen as: `audio/mpegurl`, `application/x-mpegURL`
- Content-Type header: `application/vnd.apple.mpegurl`
- Compress in transit: yes

## Good to know

- Safari and most mobile browsers play HLS natively; elsewhere, libraries such as hls.js play it through Media Source Extensions, which needs CORS on the playlist and segments.
- Playlists change during live streams, so give them short cache lifetimes; segments can be cached for long.

## Server configuration

### nginx (inside the types block in mime.types)

```
application/vnd.apple.mpegurl m3u8;
```

### Apache (.htaccess or server config)

```
AddType application/vnd.apple.mpegurl .m3u8
```

### Express

```
res.set("Content-Type", "application/vnd.apple.mpegurl");
```

### Python

```
import mimetypes

mimetypes.add_type("application/vnd.apple.mpegurl", ".m3u8")
```

### HTML file input

```
<input type="file" accept=".m3u8,application/vnd.apple.mpegurl">
```

## FAQ

### What is the MIME type for .m3u8 files?

`application/vnd.apple.mpegurl`. You may also see `audio/mpegurl`, `application/x-mpegURL`, but `application/vnd.apple.mpegurl` is the one to send.

### What Content-Type header should a .m3u8 file be served with?

`Content-Type: application/vnd.apple.mpegurl`. It compresses well, so let the server apply gzip or Brotli.

## Related types

- [.ts — video/mp2t](https://www.devkult.com/mime/ts.md)
- [.mp4 — video/mp4](https://www.devkult.com/mime/mp4.md)

Open the interactive page: https://www.devkult.com/mime/m3u8