Font blocked by CORS


I’m seeing a lot of errors in my console:

I looked it up on google and people say I have to add a line to my htaccess file.
So I made a new .htaccess file inside the htdocs folder with this code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]

<FilesMatch “.(ttf|ttc|otf|eot|woff|woff2|font.css)$”>

Header add Access-Control-Allow-Origin “

I’ve also tried “*” instead of the url but with the same result.

For some reason the code didn’t paste properly so some of the lines are missing.
This is what it really looks like:


author of that theme probably want to protect either the fonts or theme from use by people like you

you can not do anything - he has to give you permission!

example (requested resource)

Access to font at '' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

if you have enough knowledge and a lot of time to edit css and other files you can
find font here Roboto - Google Fonts

help Get Started with the Google Fonts API  |  Google for Developers

or choose another theme for WP

1 Like

Thanks for the reply!
I accidently used a link with the premium version of mdb so I didn’t have acces to the font.
The problem is solved now.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.