What is the MIME type of .apk files?
The MIME type (media type) for Android app package files with the .apk extension is application/vnd.android.package-archive. Serve with this type so Android recognises the download as an installable app.
Content-Type header
Content-Type: application/vnd.android.package-archive
Server configuration
| Server | Configuration |
|---|---|
Nginx (mime.types or types {}) | application/vnd.android.package-archive apk; |
Apache (.htaccess) | AddType application/vnd.android.package-archive .apk |
IIS (web.config) | <mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" /> |
| Node.js / Express | res.type('apk') or res.setHeader('Content-Type', 'application/vnd.android.package-archive') |
| Amazon S3 | Set Content-Type: application/vnd.android.package-archive on the object (metadata), or pass --content-type application/vnd.android.package-archive to aws s3 cp |
Should .apk files be compressed?
No. Android app package files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave application/vnd.android.package-archive out of your compression configuration.
Why the MIME type matters
Browsers decide what to do with a response — render, run, play or download — from the Content-Type header, not the file extension. With X-Content-Type-Options: nosniff, a wrong type causes stylesheets and scripts to be blocked outright. For uploads, never trust the type sent by the client; check the file’s content (its magic bytes) on the server.
Frequently asked questions
What is the MIME type for .apk?
application/vnd.android.package-archive.How do I set the Content-Type for .apk in Nginx?
application/vnd.android.package-archive apk; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.