Most of the time a common error occurs on your website, you have set the font or font awesome icons but they are invisible. Your icons are viewed in a form of squares and the font family which you have set is not working. Icons don’t show up and you are unable to fix this error. For this I am giving you a simple code by which you can easily fix it, follow my below instructions:-
- First, open your browser developer tool by pressing the f12 key or right click mouse button > Inspect element and go to console.
- After that check in console if this error is displaying –
Access to Font at 'Your site link’ from origin 'Your site link' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'Your site link' is therefore not allowed access.
<FilesMatch "\.(ttf|otf|eot)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
Final Words: – I hope my tutorial will help you and you will easily fix this error using the code. If you have another query related to this blog just post your comment below.