Praxiteles Praxiteles - 10 months ago 117
Linux Question

How to web serve a file without an extension on GoDaddy's web hosting service?

When setting up universal links for iOS apps, Apple states:

  • Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.

  • Upload the apple-app-site-association file to your HTTPS web server. You can place the file at the root of your server or in the
    .well-known subdirectory.

We have created a file named "apple-app-site-association" without an extension, but if navigate to "" we get a 404 file not found error.

Apple specifies not to add a .json to the filename.

We see another SO overflow answer describing configuration changes to IIS to serve files without extensions. But what is the trick to getting this file to be served properly from GoDaddy's Linux or IIS servers?


This is what worked for us.

We put this text in a file named "web.config" in our main web directory along with the apple-app-site-association file.

<?xml version="1.0" encoding="UTF-8"?>
             <remove fileExtension=".xml"/>
      <remove fileExtension=".svg" />
      <remove fileExtension=".ttf" />
      <remove fileExtension=".eot" />
      <remove fileExtension=".woff" />
      <remove fileExtension=".json" />
      <remove fileExtension=".otf" />
      <remove fileExtension=".mp4" />
      <remove fileExtension=".zip"/>
      <remove fileExtension=".eps"/>
      <remove fileExtension=".pdf"/>
      <mimeMap fileExtension=".pdf" mimeType="application/pdf" />
      <mimeMap fileExtension=".zip" mimeType="application/zip"/>
      <mimeMap fileExtension=".eps" mimeType="application/octet-stream"/>
      <mimeMap fileExtension=".json" mimeType="application/json" />
      <mimeMap fileExtension=".otf" mimeType="application/octet-stream" />
      <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
      <mimeMap fileExtension=".eot" mimeType="application/" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      <mimeMap fileExtension=".xml" mimeType="text/xml" />
      <mimeMap fileExtension="." mimeType="application/pkcs7-mime"/>

Of note, that properly serves the file without an extension - BUT - as we understand it - Apple still requires two other steps. (1) Your server must get an SSL certificate so it can serve that file by HTTPS (that is a ~$60/year purchase on GoDaddy); (2) Your server must also code-sign the apple-app-site-association file (that is a ~$150/year on GoDaddy for a downloadable certificate which can code sign files.)