I made a website in locahost, I uploaded the complete website in WordPress Bitnami, hosted on Google Cloud. I added SSL certificate and linked my site to cloudfare. Also using Easy SSl plugin and WP Fastest Cache plugin. Now when I open my homepage everything works perfect. But when I switch to any different page and come back to homepage then the icons of my page doesnt work. A square box appears on its place instead. When I check the console, i get the following errors:
"Access to font from origin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
Im not sure if both errors are related to each other, but I tried to figure out what is the source of error but couldnt understand it. Any help on this would be greatly appreciated.
- This topic was modified 2 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
The page I need help with: [log in to see the link]
If you’re referring to the social media icons, they load fine from my end — both the header and footer icons.
There’s something odd though: every page refreshes (once) immediately after loading. Also, I see some missing JS file in the console.
- This reply was modified 2 years, 6 months ago by Jan Dembowski.
Thank you for responding. The icons are working fine now but after sometimes it stops working. Also the google maps doesn’t work in other browsers other than chrome in my end. I am new to web development. Can you please help me what could be the reason for that wierd refresh that happens. And how to fix the missing js files.?
The icons are working fine now but after sometimes it stops working.
From my tests, it appears the icons always show when you visit the site with the www prefix… but never show when you go to the naked domain.
In the world of security, browsers treat the two addresses as different, and loading files meant for one over the other triggers this Cross-Origin Resouce Sharing (CORS) error– leading to the files being blocked. (ie if the server is set up to enforce this, which your server apparently is.)
Since your WordPress site is set up with www, the easiest way to fix this would be to simply 301-redirect the non-www domain to the www version…
You can do this redirection either at the domain/DNS level, or in your web server. I’m not familiar with Google Cloud or Bitnami, so I can’t advise you on how to pull off this one.
Can you please help me what could be the reason for that wierd refresh that happens.
I really have no idea on this one. Kindly contact your theme’s developer for help.
And how to fix the missing js files.?
These are missing files that supposedly should be in your theme (because your theme is trying to load them), but they aren’t. As you’re using a commercial theme, I have no way of knowing whether the files were included in the theme but failed to upload, the developer forgot to include these files, or even the files are no longer needed but the developer forgot to remove the link to these files. Kindly contact your theme’s developer for assistance on this.
I redirected the non www address to www address. The icons are working perfect now. For the other two issues, I’ll look into how it can be solved, they are not much problem at the moment. Thank you so much for responding and helping me. It means a lot.
- The topic ‘Icons for working after adding SSL certificate’ is closed to new replies.