0%

404 Error When Loading WOFF2 Fonts from Azure Websites

When publishing a new website in Azure, using Azure App Service, the woff2 fonts couldn’t be loaded with an 404 not found error.

To fix this issue, you need to add the following content to your web.config file:

1
2
3
4
5
6
7
8
9
10
<configuration>
<system.WebServer>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
</system.WebServer>
</configuration>

Thanks to ppolyzos’s blog.