What is MIME?
Multipurpose Internet Mail Extensions (MIME) is an Internet standard that enables the transfer of both text and non-text attachments, such as graphics, audio, and video files. It extends the ability of emails to display more than just plain text, allowing for the transfer of multimedia content.
MIME types tell web browsers how to handle specific file extensions, determining the type of file and how it should be served to users. For instance, the application/pdf
MIME type tells the browser that the file is a PDF and instructs it to handle it accordingly.
MIME types are managed by the Internet Assigned Numbers Authority (IANA), which maintains a complete list of these types. You can view the latest list on their Media Types page.
With MIME types, you can also modify, add, or delete file types specifically for your website. This allows you to serve new types of content or files as they become available. For example, with MIME types, you can serve WAP pages or other technologies by configuring the appropriate file extension handling in cPanel.
How to Add a MIME Type in cPanel
- Login to cPanel: Access your cPanel account.
- Navigate to the MIME Types Section: Under the ADVANCED section, select the MIME Types option.
- Enter the File Extension: In the MIME Type edit box, enter the file extension you want to associate (e.g.,
.php70
). If you have multiple extensions, add them separated by a space. - Save the MIME Type: Click the Add button to save the custom MIME type.
- Confirmation: You will receive a message confirming that the MIME type has been added.
- Viewing the Added MIME Type: The newly added MIME type will appear under User-Defined MIME Types.
How to Delete a MIME Type in cPanel
To remove a MIME type:
- Login to cPanel: Access your cPanel account.
- Navigate to MIME Types: Under the ADVANCED section, select the MIME Types option.
- Choose the MIME Type to Delete: Under User-Defined MIME Types, select the MIME type(s) you wish to remove and click the Delete link corresponding to the MIME type.
- Confirmation: You will receive a confirmation message stating that the MIME type has been removed.
Note: Built-in system MIME types cannot be deleted. You can only delete the MIME types that you created.
Structure of a MIME Type
A MIME type consists of two parts: the type and the subtype, separated by a slash (/
). Both parts are strings, and no whitespace is allowed in the MIME type.
The structure is as follows:
- The type represents the major category of the data (e.g., audio, text).
- The subtype specifies the exact format of the data. For example, the subtype
plain
intext/plain
refers to plain text, whilepdf
inapplication/pdf
refers to PDF documents.