Allow the download of APK files within IIS (avoiding 404 errors)

Abilitare il download di un file con estensione .APK tramite IIS

When you're developing an Android App you'll most likely want to give someone - the customers and/or beta-testers, colleagues, etc - an URL pointing to an .APK file not (yet) present in the Google Store Market. Since the vast majority of web servers (including IIS) don't natively support the .apk MIME-type, your URL will most likely give an apparently odd 404 - Page Not Found error response. In order to overcome the problem you need to add the proper MIME-type corresponding to .apk file in the following way:

  • Open the IIS Administration Panel (see picture).
  • In the left panel, click to the entry corresponding to your global IIS instance (pt. 1 in picture) so that each modification you'll make will be applied to all your past, present and future web-sites. If you only want to handle the .apk MIME-type for a specific web site, click to the entry corresponding to it instead.
  • In the right panel, Click to the "MIME Types" icon. You will be presented with a listing of all currently supported MIME-types.
  • Click to the "Add..." button near the top-right corner (pt. 2 in picture) and add the following MIME-type (pt. 3 in picture):
    • Extension: .apk (be sure to include the dot)
    • MIME-type: application/vnd.android.package-archive

Allow the download of APK files within IIS (avoiding 404 errors)

(click over the picture to enlarge)

Needless to say, this can be used to allow the download of any other file extension.

If you're not using the IIS Management interface and/or if you want to work directly on web.config level you can achieve the same result by following the comprehensive instruction explained in the official IIS configuration page.

While you're at it, if you're willing to do the same thing with iOS .ipa files you can check this post and wrap it up aswell. If you also need to enable it for Windows Phone's .xap files, check this post instead.

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

8 Comments on “Allow the download of APK files within IIS (avoiding 404 errors)”

  1. Thanks for providing the MIME type for .APK and i did download after adding this MIME type…….In a similar fashion what is the MIME Type for .ipa [of iOS apps]

  2. Pingback: Allow the download of APK files within IIS (avoiding 404 errors)
  3. Pingback: Allow the download of XAP files within IIS (avoiding 404 errors)
  4. Pingback: Allow the download of APK files within IIS (avoiding 404 errors) – Teachnical Life
    1. I don’t understand your question: if you want to download a file with a given extension, such extension’s Mime Type needs to be mapped in IIS: that’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.