Windows Server

Define new MIME types in IIS

Building a new Web Server recently, to use it for serving the PAC file necessary for auto-configuration of internet connection settings through a proxy, it was brought to my attention that after setting up the default IIS Web Server and adding the .pac file into the specified folder, the http://servername/configfile.pac is not accessible – getting a
“HTTP Error 404- File or Directory not found” message.

If i was adding any other file, like a PDF for example, it would open it straight up.

New to me, i started exploring the old Web Server settings and found that you are required to define a new custom MIME type within the IIS Web Server.

So to achieve this, you need to follow the below steps:

  • Open IIS Manager
  • Browse to the Web Site that is used for serving the PAC file
  • On the right menu click on the MIME Types
  • If you see the PAC not being defined there, you need to add:
    1. File name extension – .pac
    2. MIME type – application/x-ns-proxy-autoconfig
Adding a new MIME Type in IIS
Tagged , , ,