Font-Face CSS not working with CDN cross domain

Hello Friends, are you facing problem as font-face not working properly when style sheet / font loaded from hosted CDN domain or any other Cross Domain, However It is work fine when style sheet on the same domain.

Main reason for font-face not working is your Apache Server configuration setting that not enable for use font-files with cross domain.

You can enable it by just adding following few line code in your .htaccess file that are at your CDN domain hosted root directory.

# enable cross-site use of font-files

Header set Access-Control-Allow-Origin "*"

Header set Access-Control-Allow-Origin “*” allow all cross domain site to use this CDN hosted font, but you can exactly specify which domain should allow to access by replace * with allowed site url.


Header set Access-Control-Allow-Origin ""

Leave a Comment

Scroll to Top