Adding and Removing MIME Types

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:

  1. Go to Websites & Domains and find the website's domain name.
  2. Click Virtual Directories.
  3. Navigate to the required virtual directory and click the corresponding link with its name.
  4. Click the MIME Types tab.
  5. Click Add MIME Type.
  6. 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.
  7. Click OK to finish the creation.

To edit a MIME type for a virtual directory within a website:

  1. Go to Websites & Domains and find the website's domain name.
  2. Click Virtual Directories.
  3. Navigate to the required virtual directory and click the corresponding link with its name.
  4. Select the MIME Types tab.
  5. 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.
  6. Click OK to save changes.

To remove a MIME type for a virtual directory within a website:

  1. Go to Websites & Domains and find the website's domain name.
  2. Click Virtual Directories.
  3. Navigate to the required virtual directory and click the corresponding link with its name.
  4. Select the MIME Types tab.
  5. Select the checkbox corresponding to the MIME type you want to remove.
  6. Click Remove.
  7. Confirm removal and click OK.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Creating Virtual Directories

Creating Virtual Directories To create a virtual directory within a website: Go to Websites...

Configuring ASP.NET for Virtual Directories

Configuring ASP.NET for Virtual Directories To configure ASP.NET settings for a virtual...

Configuring PHP for Virtual Directories

Configuring PHP for Virtual Directories To be able to use web applications that require PHP4 or...

Setting Up Access to Virtual Directories

Setting Up Access to Virtual Directories To set access permissions for a virtual directory...

Changing Virtual Directory Settings

Changing Virtual Directory Settings To change settings of a virtual directory within a website:...