Title: CORS policy errors
Last modified: May 6, 2020

---

# CORS policy errors

 *  Resolved [sailors](https://wordpress.org/support/users/sailors/)
 * (@sailors)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/)
 * Hi,
 * This might not have something to do with your plugin but I hope you have some
   solutions. I get a bunch of font errors and the following is one of them,
 * Access to Font at ‘[https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/open-sans-300-normal-Uuhp.woff2&#8217](https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/open-sans-300-normal-Uuhp.woff2&#8217);
   from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-
   Origin’ header is present on the requested resource. Origin ‘null’ is therefore
   not allowed access.
 * Is it something I have to do with adding some code in .htaccess file? I had google
   map on my contact page but since it slows down my site I removed it. However,
   its embed link shows up next to the error above in the dev tools(F12).
 * I also removed all google related URLs from Prefetch DNS Requests in Hummingbird
   plugin.
    Please advise.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcors-policy-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12789031)
 * Hi,
 * I can definitely tell you that this is a server configuration issue.
 * What’s weird is that everything is successfully loaded, but for some reason your
   server is loading everything twice, once successfully, once throwing errors.
 * I suggest you contact your hosting provider. There’s nothing I can do for you
   here. Sorry.
 *  Thread Starter [sailors](https://wordpress.org/support/users/sailors/)
 * (@sailors)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12789714)
 * Thank you for your reply, Daan.
 * I’ve been trying to make improvement for last couple of days but noticed something
   funny is happening on my site cache from either Cloudflare or/and Hummingbird
   plugin. My changes weren’t reflected soon even I kept deleting all cache but 
   I finally saw some improvement this afternoon, Google map is finally gone out
   of PSI all of sudden and the 70+ CORS policy errors went down to 24. Some other
   errors have been cleared, too. I think your plugins helped, too.
 * BTW, I set Font-display option to swap and followed the instruction to generate,
   is it supposed to clear PSI “Ensure text remains visible during webfont load”
   warning, right?
 * And I use Cloudflare and leave “Serve fonts from CDN” empty, should I enter anything
   there?
 *  Plugin Author [Daan van den Bergh](https://wordpress.org/support/users/daanvandenbergh/)
 * (@daanvandenbergh)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12789737)
 * Don’t enable caching stuff, until you’re completely finished with making changes.
   It’ll create a lot of unexpected behavior. Sometimes changes do come through,
   sometimes they don’t, even when you’re 100% sure you flushed everything.
 * And yes, setting it to swap should get rid of that notice for Google Fonts. If
   you’re using any other fonts, it’ll still be there for those files.
 *  Thread Starter [sailors](https://wordpress.org/support/users/sailors/)
 * (@sailors)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12790882)
 * Ahhh, that would explain why I’m getting weird behavior, and was wondering why
   it hasn’t fully improved yet, will disable those two caching features and try
   again.
 *  Thread Starter [sailors](https://wordpress.org/support/users/sailors/)
 * (@sailors)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12791680)
 * I got better results with fewer errors this time but PSI score hasn’t changed
   much, mobile 38 / desktop 35. I still get that persistent “Ensure text remains
   visible during webfont load”. Here’s my step,
 * 1. I made sure that Font-display option is set to Auto(default) first, then clicked
   the Auto Detect button.
    2. I opened my home page and let all fonts load, refresh
   it(ctrl+shift r) just in case, went back to OMGF page and clicked the top link
   to refresh. 3. I checked all fonts for preload option and downloaded fonts. 4.
   After that I changed Font-display option to Swap, saved it, and finally generate
   stylesheet.
 * I also got this “Specify a character set early” errors for a lot of woff2 and
   here is one of them,
    [https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/josefin-sans-100-italic-LSzo.woff2](https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/josefin-sans-100-italic-LSzo.woff2)
 * I will search for a solution tomorrow since it is 1am now, need to sleep but 
   if you have some solutions please advise.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CORS policy errors’ is closed to new replies.

 * ![](https://ps.w.org/host-webfonts-local/assets/icon-256x256.png?rev=3300821)
 * [OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.](https://wordpress.org/plugins/host-webfonts-local/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/host-webfonts-local/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/host-webfonts-local/)
 * [Active Topics](https://wordpress.org/support/plugin/host-webfonts-local/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/host-webfonts-local/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/host-webfonts-local/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [sailors](https://wordpress.org/support/users/sailors/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/cors-policy-errors/#post-12791680)
 * Status: resolved