Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

What Are MIME Types and How Do You Add Them?

MIME types tell browsers what kind of file they are getting. This guide explains them and shows how to add a new one in cPanel.

Website Management1 min read10 steps3 screenshots

What is a MIME type?

MIME stands for Multipurpose Internet Mail Extensions. A MIME type is a label for a file. It tells the browser if a file is a web page, a picture, a video or something else. It is like the label on a lunchbox that says what is inside.

Here are some examples.

File typeMIME type
HTML pagetext/html
JPEG pictureimage/jpeg
PDF fileapplication/pdf
MP4 videovideo/mp4

Why add one?

Sometimes your server does not know a file type. The browser may then show strange text or just download the file. Adding a MIME type fixes this. Newer file types such as fonts are common examples.

Steps: add a MIME type in cPanel

  1. Log in to cPanel.
  2. In the Advanced section, click MIME Types.
  3. Find the box called Create a MIME Type.
  4. In the MIME Type field, enter the label, for example font/woff2.
  5. In the Extension(s) field, enter the file ending without a dot, for example woff2.
  6. Click Add.

This tells the server that files ending in .woff2 are fonts.

Steps: add a MIME type with .htaccess

You can also use the .htaccess file. It holds rules for your site. Back it up first.

  1. Open File Manager.
  2. Open .htaccess in your site folder. Turn on Show Hidden Files if needed.
  3. Add this line.
AddType font/woff2 .woff2

This does the same job for that one site.

  1. Save the file and test your site.
Tip: You can delete a MIME type you added from the list on the same cPanel page.

Quick recap

  • A MIME type labels the kind of a file.
  • Missing types can make files act wrongly.
  • Add them in cPanel under MIME Types.
    cPanel MIME Types
    cPanel Create a MIME Types
    cPanel System MIME Types
  • Or add an AddType line in .htaccess.