Search code examples
cssfont-face

@font-face displays only when www. not in address. Domain name only, displays correctly


I have a client site on a Wordpress implementation and in Firefox 4 on my PC, the @font-face renders just fine when www. is left out of the address. However, if you visit the full URL, it no longer works.

I'm stumped. Any thoughts?


Solution

  • It sounds like you are hitting the Firefox default font policy.

    Firefox does not allow cross-domain fonts by default (even with sub-domains). See the following questions for some excellent help in this area:

    @font-face fonts only work on their own domain

    How to add an Access-Control-Allow-Origin header