MIME types in cPanel: configure file extensions
Add custom MIME types in cPanel or .htaccess so browsers handle WebP, fonts, JSON, video, and other file types correctly.
MIME types tell browsers what kind of file the server is sending. If a MIME type is missing or wrong, a file may download instead of display, fail to load as a font, or be blocked by the browser.
What MIME types do
A MIME type pairs a file extension with a content type, such as .webp with image/webp or .json with application/json. Most common types are already configured by the server, so only add custom entries when a file type is not being handled correctly.
Add a MIME type in cPanel
- Log in to cPanel.
- Open Advanced and choose MIME Types.
- Enter the MIME type, such as
image/webp. - Enter the extension without a dot, such as
webp. - Click Add.
Common examples
| Extension | MIME type | Use |
|---|---|---|
webp | image/webp | Modern image format. |
woff2 | font/woff2 | Web fonts. |
svg | image/svg+xml | SVG images. |
json | application/json | API and app data. |
mp4 | video/mp4 | Video files. |
Set MIME types in .htaccess
If the cPanel MIME Types tool is not available, add entries to the site's .htaccess file:
AddType image/webp .webp
AddType font/woff2 .woff2
AddType image/svg+xml .svg
AddType application/json .json
Troubleshooting
- Clear browser and CDN cache after adding a MIME type.
- Check the browser developer tools Network tab to confirm the
Content-Typeresponse header. - Remove duplicate or conflicting
AddTyperules from nested.htaccessfiles. - If a 500 error appears after editing
.htaccess, revert the last change and check cPanel error logs.
Related: Advanced .htaccess in cPanel: redirects, PHP settings, and access rules | cPanel File Manager: upload, edit, organize, and delete files | How to enable PHP extensions in cPanel
Need cPanel hosting or licensing?
Use UnderHost cPanel hosting or add cPanel/WHM to a VPS or dedicated server for familiar website, email, DNS, and database management.





















