Home
/
Advanced Site Tools
/
Other
/
How to add MIME types?

How to add MIME types?

MIME types are a way of instructing the browser, which is opening a particular file from the server, how to handle it. For example an .html file is of a text/html MIME type and this instructs your browser to interpret all of the files that use that extension as HTML Document files.

This can be useful when for example you want to get the visitor’s browser to download an mp3 file instead of playing it in the browser.

To define a new MIME type, add the following line in your .htaccess in the folder where the files for your website reside:

AddType TYPE .extension

Replace TYPE with the desired MIME type and .extension with the file extension you want it to apply for.

Share This Article