OTF type font file giving 404 error on GoDaddy Hosting

I am trying to use custom fonts on one my website. Everything is working fine on my local but when I upload the font and css file on Godaddy hosting and try to access website. Font file gives 404 not found error. I solved this problem by adding following tag to web.config file.

      <mimeMap fileExtension=".otf" mimeType="font/otf" />

It seems that IIS on godaddy windows hosting does not know what OTF file is so its blocking it. You will have specifically register the font file type as MIME type. Hope this simple fix saved you some time.

Subscribe for our monthly newsletter for updated articles and useful code scripts.

Share It

comments powered by Disqus