MENU CLOSE
  • Home
  • Blog
  • Get in touch

Hi, I am George

Hi, I am George

  • Home
  • Blog
  • Get in touch

Fonts not working on XAMPP (localhost) on Firefox [Solution]

ON 30.01.2021 0 COMMENT

So after migrating a live site to localhost to test some new design layouts, the custom fonts were not working.

I checked and the path to the font and css was ok, fonts were loaded correctly (relatively) and in the right folder.

So I went in the FF debugger and found that font had this error message next to them:

CORS header 'Access-Control-Allow-Origin' missing

Here is the reference page on Mozilla.

The solution is simple.

Ad .htaccess file in the directory of your site and there put this in the beginning:

<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin “*”
</IfModule>

Also make sure mod_headers in Apache is enabled.

Here is how to check it:

  1. Open the file httpd.conf at "your apache folder"/conf
  2. Find the following line using CTRL+f in your text editor: #LoadModule headers_module modules/mod_headers.so
  3. Remove the #
  4. Save and restart your Apache.

That’s it. Fonts should load normally now.

PREV Migrating EasyEngine 3.8 to WordOps
NEXT Защо избрах хостинг в Jump?

Leave a Comment Cancel Reply

  • Recent Posts

    • Защо избрах хостинг в Jump?
    • Fonts not working on XAMPP (localhost) on Firefox [Solution]
    • Migrating EasyEngine 3.8 to WordOps
    • Solve “Error establishing a database connection” of WordPress on a VPS (EasyEngine v4)
    • My Conor McGregor dupe SEO experiemnt
  • Archives

    • May 2021
    • January 2021
    • June 2020
    • May 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2018
    • August 2018
    • July 2018
    • May 2018
  • Categories

    • SEO