Adding and Removing MIME Types
Multipurpose Internet Mail Exchange (MIME) types instruct a web browser or mail application how to handle files received from a server. For example, when a web browser requests an item on a server, it also requests the MIME type of the object. Some MIME types, like graphics, can be displayed inside the browser. Others, such as word processing documents, require an external application to be displayed.
When a web server delivers 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 also 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 can only operate files of registered MIME types. These types could be defined both on the global IIS level and on the website or virtual directory level. Globally-defined MIME types are inherited by all websites and virtual directories while ones defined on the website main or virtual directory level are used only for the area where they are defined. Otherwise, if the web server receives request for a file with unregistered MIME type, it returns the 404.3 (Not Found) error.
To add a MIME type for a virtual directory within a website:
- Go to Websites & Domains and find the website's domain name.
- Click Virtual Directories.
- Navigate to the required virtual directory and click the corresponding link with its name.
- Click the MIME Types tab.
- Click Add MIME Type.
- Specify the following:
- Type the file name extension in the Extension field. File name extension should begin with a dot (.), or a wildcard (*) to serve all files regardless of file name extension.
- Specify the file content type in the Content field.
- You can either select the appropriate value from the list or define a new content type. To do this, select Custom and enter the content type in the input box provided.
- Click OK to finish the creation.
To edit a MIME type for a virtual directory within a website:
- Go to Websites & Domains and find the website's domain name.
- Click Virtual Directories.
- Navigate to the required virtual directory and click the corresponding link with its name.
- Select the MIME Types tab.
- Select the required MIME type in the list.
- Type the file name extension in the Extension field. File name extension should begin with a dot (.), or a wildcard (*) to serve all files regardless of file name extension.
- Specify the file content type in the Content field.
- You can either select the appropriate value from the list or define a new content type. To do this, select Custom and enter the content type in the input box provided.
- Click OK to save changes.
To remove a MIME type for a virtual directory within a website:
- Go to Websites & Domains and find the website's domain name.
- Click Virtual Directories.
- Navigate to the required virtual directory and click the corresponding link with its name.
- Select the MIME Types tab.
- Select the checkbox corresponding to the MIME type you want to remove.
- Click Remove.
- Confirm removal and click OK.