1

I am getting this error after doing inspect element in browser.

Font awesome icons not showing properly on website showing instead of square

Font from origin 'http://www.example.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access.

One thing I observe that when I load my website by simply enter url, that time not loading font awesome icons but works after navigating on other page

Pravin
  • 37
  • 1
  • 12

1 Answers1

0

Its www.site.com vs. site.com

Solutions -

  1. You can solve by redirecting http://www.example.com to http://example.com

  2. You can do that with this .htaccess file at the site root.

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

Please check - https://stackoverflow.com/questions/27009425

Community
  • 1
  • 1
Monika
  • 456
  • 3
  • 9