.apk MIME type
Android app packageapps & binaries
application/vnd.android.package-archiveAndroid app packages. The type tells Android browsers the download is an installable app.
| MIME type | application/vnd.android.package-archive |
|---|---|
| Extensions | .apk |
| Content-Type | application/vnd.android.package-archive |
| Compress in transit? | No — already compressed |
| File signature | 50 4B 03 04 (PK..) the ZIP signature — this format is a ZIP archive inside |
Good to know
- Served with a generic type, some Android browsers save the file as
.zipor.bininstead.
Serve .apk files with the right type
The response header to send:
Content-Type: application/vnd.android.package-archive
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
application/vnd.android.package-archive apk;
AddType application/vnd.android.package-archive .apk
res.set("Content-Type", "application/vnd.android.package-archive");import mimetypes
mimetypes.add_type("application/vnd.android.package-archive", ".apk")<input type="file" accept=".apk,application/vnd.android.package-archive">
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.apk | grep -i '^content-type:' file --mime-type file.apk
Frequently asked questions
What is the MIME type for .apk files?
application/vnd.android.package-archive.
What Content-Type header should a .apk file be served with?
Content-Type: application/vnd.android.package-archive. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .apk?
Check its bytes rather than the extension: APK files start with 50 4B 03 04 (PK..) — the ZIP signature — this format is a ZIP archive inside. On the command line, file --mime-type name.apk does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options