APK MIME type config for your server (download APK correctly)
Hosting your APK on your own site? Serve it with the right content type so phones download and offer to install it, instead of showing gibberish or a .zip.
The MIME type for APK files
application/vnd.android.package-archive. With it, Android's browser saves the file as .apk and offers to open it with the package installer. Without it, servers often send application/octet-stream (usually fine) or application/zip (the file may be renamed to .zip).
Other tips for an APK download page
- Serve over HTTPS — Chrome warns on insecure downloads.
- Publish the SHA-256 next to the link so people can verify it.
- Put the version number in the file name, e.g.
my-app-1.4.apk, to dodge stale caches. - Link to install instructions for first-time sideloaders.
Testing your download link
Check the headers your server sends with curl -I https://your-site.com/downloads/my-app.apk. You want content-type: application/vnd.android.package-archive and, if you forced downloads, a content-disposition: attachment line. Then open the link in Chrome on an Android phone: it should download a file ending in .apk and offer Open.
Questions people ask
What MIME type should an AAB use?
AABs aren't installed from the web; you upload them to Play Console. If you host one, application/octet-stream is fine.