MIME (Multipurpose Internet Mail Extensions) types tell the browser how to handle different file types. When a web server delivers a file, it includes a MIME type header that tells the browser whether to display the file, download it, or treat it as a specific format.
Please note: Screens and options may vary slightly depending on your cPanel version and hosting plan.
Viewing and Adding MIME Types
- Log in to your cPanel account.
- In the Advanced section, click MIME Types.
- The page shows currently configured MIME types.
- To add a new type:
- Enter the MIME Type (e.g. application/json, font/woff2, video/webm). - Enter the Extension (e.g. .json, .woff2, .webm). - Click Add.
Common MIME Types
| File Type | Extension | MIME Type | |-----------|-----------|-----------| | JSON | .json | application/json | | SVG Image | .svg | image/svg+xml | | WebP Image | .webp | image/webp | | WOFF2 Font | .woff2 | font/woff2 | | WebM Video | .webm | video/webm | | MP4 Video | .mp4 | video/mp4 | | MP3 Audio | .mp3 | audio/mpeg | | M3U8 Playlist | .m3u8 | application/vnd.apple.mpegurl | | MPEG-DASH | .mpd | application/dash+xml |
When to Add MIME Types
You typically need to add MIME types when:
- Serving a file type that the browser doesn't recognise or handles incorrectly (e.g. downloading instead of displaying).
- Using modern formats (WebP, WOFF2, AVIF) that may not be configured on older servers.
- Hosting audio/video streams that require specific MIME types for proper playback.
- Serving custom file formats specific to your application.
Removing a MIME Type
Click Delete next to the MIME type entry on the MIME Types page.
Tips
- Most common MIME types are already configured on the server. You only need to add custom ones.
- Incorrect MIME types can cause browsers to mishandle files. If a file downloads when it should display (or vice versa), check the MIME type.
- You can also set MIME types in
.htaccessusingAddType:
AddType image/webp .webp
AddType font/woff2 .woff2
What Next?
- Customising PHP Settings — Configure other server-side settings.
- Understanding .htaccess Files — Alternative method for setting MIME types.