This document contains information on how to add MIME types from cPanel so that the browser knows how to display or download files with extensions that the server does not recognize.
A MIME type tells the browser what kind of file it is receiving. For example, text/html for a web page or image/jpeg for a photo. With that information, the browser decides whether to display it, play it, or download it. The server already includes the most common types; this tool is used to add any missing ones.
The format is always type/subtype: the type indicates the general category (image, video, audio, font, application, text) and the subtype indicates the specific format. For example, image/webp.
Access: log in to cPanel from the client portal → Log in to cPanel, or at https://yourdomain.com/cpanel. Then open Advanced → MIME Types.
When is it necessary?
- A file downloads instead of displaying, or displays as strange text.
- You use a new format that the server does not have registered.
- You want a file type to always download instead of opening in the browser.
Adding a MIME type
- In MIME Type, type the type, for example
image/webp. - In Extensions, type the extension, for example
webp. You can enter multiple extensions separated by spaces. - Click Add.
The new type appears under User Defined MIME Types. To remove it, click Delete next to it and confirm. System table types cannot be deleted.
Useful examples
- WebP images:
image/webp, extensionwebp. - Web fonts:
font/woff2, extensionwoff2. - Android applications:
application/vnd.android.package-archive, extensionapk. - Force file download:
application/octet-streamwith the extension you want to download.
You can check more types in the MDN MIME types list.
Important: never assign a MIME type to site code extensions, such as php, pl, or cgi. If treated as text or download, the browser may expose the source code, including database passwords. Only add types for files you want to display or download.
MIME types indicate how the browser handles a file. To change how the server processes it, for example to execute it as a script, use the Apache Handlers tool.
Common issues
- I added the type and the file still looks the same: reload without cache using Ctrl + F5. Also check that the extension is typed without a dot and in lowercase.
- The file downloads instead of opening: the MIME type is incorrect or is
application/octet-stream. Correct it with the appropriate type for that format. - The site shows code instead of the page: delete the MIME type you added for that extension.
If you don't know which MIME type corresponds to a format, open a ticket from the client portal or consult via the site's online chat.
