Forums

Font Awesome CDN not working.

I am using font awesome in my website, I is working fine at localhost and also at the default domain (like my username.pythonanywhere.com). But it's not working on my actual/custom domain. Please Help!

Check your browser developer tools to see why it's not loading.

I have a similar issue. The developer tools says jquery-1.9.1.min.js:3 GET https://virtualta.pythonanywhere.com/webfonts/fa-solid-900.woff2 net::ERR_ABORTED 404 (NOT FOUND)

I tried to follow the instructions on Stackoverflow (link below) but not sure where I should change the code to allow woff fonts. Thank you!

https://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts

That means that you are not serving the file from your web app. You're not getting the file from the CDN, you're getting it from your web app. If you want to use the CDN, then you need to use the address for the file on the CDN, not on your web app. If your want to serve the file from your web app, then see https://help.pythonanywhere.com/pages/StaticFiles/ and https://help.pythonanywhere.com/pages/DebuggingStaticFiles/

Thanks for the links. I believe my static files are mapped correctly. In my html code I have <link rel="stylesheet" href="css/bootstrap.min.css" /> And on the webapp static file sections I have css/ mapped to the correct directory /home/VirtualTA/mysite/templates/css/.

It looks like everything else on the CSS is working but just not Font Awesome. Could there be other reasons that are causing the issues?

You said you setup a mapping at /css/. but you are trying to access https://virtualta.pythonanywhere.com/webfonts/fa-solid-900.woff2.

perhaps you want to either setup a mapping at /webfonts, or otherwise be accessing something like https://virtualta.pythonanywhere.com/css/webfonts/fa-solid-900.woff2.