MIME (Multipurpose Internet Mail Extensions) types tell browsers how to handle specific file extensions. If you are hosting fonts (such as Google Fonts or Font Awesome) locally, make sure you set the correct MIME types for WOFF fonts in your web server.
As of February 2017, the standard MIME type for WOFF is font/woff
and font/woff2
for WOFF2.
Apache
In Apache, simply add the following snippet to the .htaccess file located in your site's root directory.
# MIME Mappings AddType font/woff .woff AddType font/woff2 .woff2
IIS
Alternatively, if you are using an IIS web server, you can use the following snippet in your Web.config file.
<configuration> <system.webServer> <staticContent> <mimeMap fileExtension=".woff" mimeType="font/woff" /> <mimeMap fileExtension=".woff2" mimeType="font/woff2" /> </staticContent> </system.webServer> </configuration>