# .m4a MIME Type: audio/mp4

> AAC or ALAC audio in an MPEG-4 container — the format of iTunes and many podcasts.

- MIME type: `audio/mp4`
- Extensions: .m4a
- Also seen as: `audio/x-m4a`
- Content-Type header: `audio/mp4`
- Compress in transit: no (already compressed)
- File signature: `66 74 79 70` at offset 4 (an ISO base media file; the brand after ftyp is typically M4A )

## Good to know

- Apple software often reports `audio/x-m4a`; the registered type is `audio/mp4`.

## Server configuration

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

```
audio/mp4 m4a;
```

### Apache (.htaccess or server config)

```
AddType audio/mp4 .m4a
```

### Express

```
res.set("Content-Type", "audio/mp4");
```

### Python

```
import mimetypes

mimetypes.add_type("audio/mp4", ".m4a")
```

### HTML file input

```
<input type="file" accept=".m4a,audio/mp4">
```

## FAQ

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

`audio/mp4`. You may also see `audio/x-m4a`, but `audio/mp4` is the one to send.

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

`Content-Type: audio/mp4`. It's already compressed, so servers shouldn't gzip it.

### How can I tell if a file is really a .m4a?

Check its bytes rather than the extension: M4A files contain `66 74 79 70` (`ftyp`) at byte offset 4 — an ISO base media file; the brand after ftyp is typically M4A . On the command line, `file --mime-type name.m4a` does this for you.

## Related types

- [.mp3 — audio/mpeg](https://www.devkult.com/mime/mp3.md)
- [.aac — audio/aac](https://www.devkult.com/mime/aac.md)
- [.mp4 — video/mp4](https://www.devkult.com/mime/mp4.md)

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