Some servers do not work with WOFF OR WOFF2 font files. The default configuration for most web servers is to deny a request for any unexpected file types, including this one. This might be the reason for the HTTP 404 response, even though the file exists. (see picture below)





The solution


Simply update your web.config file to tell the IIS webserver that this file is okay to serve, and how to serve it.  Use your preferred method to edit the web.config file, including the built-in Configuration Manager module.


Find the <system.webServer> section in your web.config file, and look to see if it already contains a <staticContent> section; if it does not, then create it.


In the example below, the <staticContent> section did not exist and it was added to the top of the <system.webServer> section, before the <modules> section.  In your site configuration, you don't need to have this exact placement. Just make sure that the <staticContent> section is somewhere between the open and close <system.webServer> tags.

  <system.webServer>

    <staticContent>

      <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />

         <remove fileExtension=".woff" />

      <remove fileExtension=".woff2" />

      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />

      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

    </staticContent>

    <modules>


The important parts of the example above are the <remove> and <mimeMap> tags for your font files.  If you already have a <staticContent> section added, make sure those lines are added in your configuration file.

Once you save this update, your site will no longer display or report this HTTP 404 error for your WOFF or WOFF2 files.