.dmg MIME type
Apple disk imageapps & binaries
application/x-apple-diskimagemacOS disk images, the usual way to distribute Mac apps outside the App Store.
| MIME type | application/x-apple-diskimage |
|---|---|
| Extensions | .dmg |
| Content-Type | application/x-apple-diskimage |
| Compress in transit? | No — already compressed |
Good to know
- DMG files have no signature at the start; the identifying
kolyblock sits in the last 512 bytes. - macOS checks downloaded apps with Gatekeeper, which wants them signed and notarized. The Content-Type plays no part.
Serve .dmg files with the right type
The response header to send:
Content-Type: application/x-apple-diskimage
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
nginx (inside the types block in mime.types)
application/x-apple-diskimage dmg;
Apache (.htaccess or server config)
AddType application/x-apple-diskimage .dmg
Express
res.set("Content-Type", "application/x-apple-diskimage");Python
import mimetypes
mimetypes.add_type("application/x-apple-diskimage", ".dmg")HTML file input
<input type="file" accept=".dmg,application/x-apple-diskimage">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.dmg | grep -i '^content-type:' file --mime-type file.dmg
Frequently asked questions
What is the MIME type for .dmg files?
application/x-apple-diskimage.
What Content-Type header should a .dmg file be served with?
Content-Type: application/x-apple-diskimage. It's already compressed, so servers shouldn't gzip it.
Related types
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options