Views:

This page contains information regarding adding additional MIME types

 

Adding Additional MIME Types

Overview

Whenever content is returned from a web server it includes a MIME Content Type header, which provides information to the client about the type of data which is being returned. Using this header the client is able to determine the best way to handle the content, which may include opening a helper application. For files returned directly from the server the MIME type is defined by the extension of the file.

The following table shows some MIME type examples:

Type / SubtypeFile Extension
application/msworddoc
application/pdfpdf
video/mpegmpeg
video/x-flvflv
audio/mpegmp3
image/jpegjpg
text/htmlhtml

Voyager has a predefined server wide list of common MIME types configured on Windows IIS and Unix Apache servers. However if you have files on your site for which a MIME type is not defined, the content of these files may not be displayed correctly by the client.

The predefined list can not be modified, but additional MIME types can be easily added to individual site following the instructions below:

Adding MIME Types Under Unix Hosting Accounts

  1. Determine the MIME type required for the file. A list of registered MIME types and extensions can be found at: http://www.iana.org/assignments/media-types/
  2. Create a .htaccess file with a text editor and add each MIME type using the Apache AddType directive.
    Example:

    <IfModule mod_expires.c> 
    ADDTYPE application/x-shockwave-flash swf
    </ifModule mod_expires.c>

    The AddType tells the server to add a new MIME type. The application/x-shockwave-flash is the actual MIME type and the swf is the extension of the file. You can add as many MIME types as required, simply repeat the line for each MIME type.

  3. Save and upload the .htaccess file to the document root of your site; the new MIME types will active immediately.

Adding MIME Types Under Windows Hosting Accounts

  1. Determine the MIME type required for the file. A list of registered MIME types and extensions can be found at: http://www.iana.org/assignments/media-types/
  2. Login to the Plesk Server Administrator.
  3. Select the domain name you wish to add the MIME type for.
  4. Click on the Web Directories button.
  5. Select the Mime Types tab and enter the new file extension and MIME type and click OK.
  6.  

 

Get in touch

For any additional help, give us a call on 0800 477 333 (8AM to 10PM, 7 days a week).