Share via


Configure MIME Types

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

Internet Information Services (IIS) serves only static files with extensions registered in the Multipurpose Internet Mail Exchange (MIME) types list. IIS is preconfigured to recognize a default set of global MIME types, and also allows you to configure additional MIME types and change or remove MIME types. These MIME types are recognized by all Web sites you create in IIS.

MIME types can also be defined at the Web site and directory levels, independent of one another or the types defined globally. When you view MIME types at the Web site or directory level, only the types unique to that level are displayed, not all types inherited from the next level up. If you apply a MIME type at the global level after modifying the same MIME type at a lower level, the global-level MIME type overrides the modified MIME type at the lower level.

When IIS delivers a mail message to a mail application, or a Web page to a client Web browser, it also sends the MIME type of the data it is sending. If there is an attached or embedded file in a specific format, IIS tells the client application the MIME type of the embedded or attached file. The client application then knows how to process or display the data being received from IIS. IIS returns error 404.3 if a client request refers to a file name extension that is not defined in the MIME types.

Requirements

  • Credentials: Membership in the Administrators group on the local computer.

  • Tools: Iis.msc.

Recommendation

As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type **runas /user:**administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.

Procedures

To add a global MIME type

  1. In IIS Manager, right-click the local computer, and click Properties.

  2. Click the MIME Types button.

  3. Click New.

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

  5. In the MIME type box, type a description that exactly matches the file type defined on the computer.

    Note

    You can also create a MIME type for files without an extension or for undefined MIME types. This is not recommended.

  6. Click OK.

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 description that exactly matches the file type defined on the computer. 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.

  7. Click OK.

To remove a MIME type from a Web site or directory

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

  2. Click the HTTP Headers tab.

  3. Click Mime Types.

  4. From the Registered MIME types list, click the MIME type you want to remove, and then click Remove.

  5. Click OK three times.