How to show Cross-Domain Fonts in Mozilla FireFox

Cross-Domain Fonts and CORS, FixMyWP guide header image

Working with my clients doesn’t leave me any free time to update and check my own website FixMyWP.com for any issues. Since I work mostly with Chrome and only use Firefox, Opera and IE for debugging my client websites, I rarely browse Fix My WP with any of them. Today was the first time I used Firefox to browse my homepage after enabling cdn services from MaxCDN, a CDN service that improved my website loading time a lot. Apparently this change affected my website fonts in Firefox, where they didn’t show: Firefox showing missing cross-domain fonts on a CDN site With MaxCDN all my static content is actually being served from their server facilities, using an external domain like fixmywp-makistv.netdna-ssl.com instead of my native domain fixmywp.com. It turns out Firefox doesn’t load cross-domain fonts by default, so we need to apply a fix that allows them:

  1. Open your .htaccess file. It’s located in the root folder of your website (you can get there with your hosting panel’s file manager or an SFTP/FTP client like Filezilla).
  2. Move the cursor to the top of the file contents, press Enter to create a new blank line.
  3. Insert the following snippet:
    # Allow web fonts to load from a CDN or other domain
    <FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
      </IfModule>
    </FilesMatch>
  4. Save the file, clear your CDN and browser cache and refresh your website.

The snippet needs the Apache mod_headers module, which most hosts enable. The “*” lets any site load your fonts; if you prefer, replace it with your own address, for example “https://yourdomain.com”. If your server runs Nginx, which does not read .htaccess files, ask your host to add the same header to the server configuration.

★★★★★
My site load times were slow and I needed FixMyWP to help me fix this. … Things are so much better.
Liana Roxanne Clark
eclecticjourneyphotography.com

Need a hand with your WordPress site?

Answer four quick questions and see your flat price before you pay. Most fixes are done the same day or within 24 business hours.

Answer 4 quick questionsSee all prices

In this article

Need a hand with your site?

Answer four quick questions and see your flat price before you pay. Most fixes are done the same day or within 24 business hours.

Related articles