Home > Security > Loading custom fonts from the same domain and font does not display. The code inspector console view shows a CORS policy blocked message
Bookmark and Share

Loading custom fonts from the same domain and font does not display. The code inspector console view shows a CORS policy blocked message

Posted on April 23, 2018 | Filed in Security, The Web, Wordpress
Access to Font at 'http://mysite.com/somefont.woff' from origin 'http://www.mysite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.mysite.com' is therefore not allowed access.

When you see a warning like the above in your Chrome console view – the problem can be solved quickly.
This problem occurs when your website has a domain like http://www.mysite.com yet in the code requests assets from http://mysite.com.

While the domain is the same, www.mysite.com is considered a different source than mysite.com.

Just make them the same and the font will load.

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog