# .rpm MIME Type: application/x-rpm

> Software packages for Fedora, RHEL, openSUSE and other RPM-based distributions.

- MIME type: `application/x-rpm`
- Extensions: .rpm
- Content-Type header: `application/x-rpm`
- Compress in transit: no (already compressed)
- File signature: `ED AB EE DB`

## Good to know

- Install a downloaded package with `sudo dnf install ./package.rpm`, or `sudo zypper install` on openSUSE.

## Server configuration

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

```
application/x-rpm rpm;
```

### Apache (.htaccess or server config)

```
AddType application/x-rpm .rpm
```

### Express

```
res.set("Content-Type", "application/x-rpm");
```

### Python

```
import mimetypes

mimetypes.add_type("application/x-rpm", ".rpm")
```

### HTML file input

```
<input type="file" accept=".rpm,application/x-rpm">
```

## FAQ

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

`application/x-rpm`.

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

`Content-Type: application/x-rpm`. It's already compressed, so servers shouldn't gzip it.

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

Check its bytes rather than the extension: RPM files start with `ED AB EE DB`. On the command line, `file --mime-type name.rpm` does this for you.

## Related types

- [.deb — application/vnd.debian.binary-package](https://www.devkult.com/mime/deb.md)
- [.tar — application/x-tar](https://www.devkult.com/mime/tar.md)

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