Creating MIME Types for a Web site or directory

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

If you have MIME types that you want a particular Web site or directory to recognize, you can add the new MIME types at the Web site or directory level in IIS.


You can also configure IIS to serve undefined file types by adding a wildcard character (*) MIME type. Do not use wildcard MIME-types on production servers. Doing so can result in IIS serving unrecognized files and displaying sensitive information to users. Wildcard MIME-types are intended for testing purposes or in scenarios where Internet Server API (ISAPI) filters have been developed specifically to handle these wild card scenarios, for example, a custom authentication ISAPI.



You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

To add a MIME type to a Web site or directory

  1. In IIS Manager, right-click the Web site or Web site directory for which you want to add a MIME type, and click Properties.

  2. Click the HTTP Headers tab.

  3. Click MIME Types.

  4. Click New.

  5. In the Extension box, type the file name extension.

  6. In the MIME type box, type a valid MIME type. If you define a MIME type that has already been defined at a higher level, you are prompted to select the level where the MIME type should reside.

    To create a MIME type for an undefined MIME type, type an asterisk (*) in the Extension box, and type application/octet-stream in the MIME type box.

    To create a MIME type for a file without an extension, type a period (.) in the Extension box, and type your MIME type in the MIME type box.

  7. Click OK.

The following illustration shows the relationship between a MIME type defined in IIS and a file type defined on a client computer.

Art Image