# .ogg MIME Type: audio/ogg

> Ogg container, usually holding Vorbis or Opus audio.

- MIME type: `audio/ogg`
- Extensions: .ogg, .oga
- Also seen as: `application/ogg`
- Content-Type header: `audio/ogg`
- Compress in transit: no (already compressed)
- File signature: `4F 67 67 53`

## Good to know

- Ogg video uses `video/ogg` (`.ogv`); the generic `application/ogg` is for files whose content you don't know.

## Server configuration

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

```
audio/ogg ogg oga;
```

### Apache (.htaccess or server config)

```
AddType audio/ogg .ogg .oga
```

### Express

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

### Python

```
import mimetypes

mimetypes.add_type("audio/ogg", ".ogg")
mimetypes.add_type("audio/ogg", ".oga")
```

### HTML file input

```
<input type="file" accept=".ogg,.oga,audio/ogg">
```

## FAQ

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

`audio/ogg`. You may also see `application/ogg`, but `audio/ogg` is the one to send. The same type covers .oga.

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

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

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

Check its bytes rather than the extension: OGG files start with `4F 67 67 53` (`OggS`). On the command line, `file --mime-type name.ogg` does this for you.

## Related types

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

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