Apple Pay Domain Verification with IIS

Published on Author JFLeave a comment

Apple Pay will give you a file to post on your site in order to verify your domain, similar to how SSL certificate and Google Analytics does it.

In my case, however, the path Apple gave included no extension on the filename.

IIS will not deliver files without an extension by default. You have to add a MIME type in order to do so.

It’s easy in IIS to add a mime type to only the folder you want, or you can create a web.config file in the folder and paste the following into it:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
 <staticContent>
 <mimeMap fileExtension="." mimeType="text/html" />
 </staticContent>
 </system.webServer>
</configuration>

To do it through the IIS gui, simply click on the folder you created in the left pane, then double-click MIME Types.

apple-pay-iis-mime-types

Under Actions in the right column.

Although the type will work with just “”, the gui requires an entry, so just put in a period and the type as “text/html”. It works with just the period, as well.

apple-pay-iis-mime-types-entry

This loads in real time, so once the web.config file is in the folder your job is done.

Leave a Reply

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

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