CORS Error with Google Fonts After Domain Transfer
-
Hello WordPress Support,
I am encountering a persistent issue where Google fonts are not displaying correctly on my live site (
https://expandspace.com) after transferring the domain from GoDaddy. The site was originally built on a staging URL (https://exsdev2025.wpcomstaging.com) before the domain transfer.Issue:
Google fonts are not appearing, and the console shows CORS policy errors indicating that font files are still being fetched from the staging URL (
https://exsdev2025.wpcomstaging.com).Example Error:
Access to fetch at ‘https://exsdev2025.wpcomstaging.com/wp-content/uploads/elementor/google-fonts/fonts/poppins-pxigyp8kv8jhgfvrjjluchta.woff2’ from origin ‘https://expandspace.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Troubleshooting Steps Attempted:
- Regenerating CSS & Clearing Cache:
- Cleared outdated CSS files via Elementor > Tools > Regenerate CSS & Data.
- Cleared WordPress and browser cache.
- URL Replacement via Plugins:
- Used Better Search Replace to replace
https://exsdev2025.wpcomstaging.comwithhttps://expandspace.com(0 rows affected). - Tried WP Migrate Lite, but no Find & Replace option was available.
- Used Better Search Replace to replace
- Using Elementor’s Built-in URL Replace Tool:
- Attempted URL replacement via Elementor > Tools > Replace URL.
- Database Inspection:
- Checked
wp-config.phpfor staging URL references but found none.
- Checked
- Console & Network Check:
- Verified that requests are still being made to the staging URL.
Could you help me resolve this issue and ensure that all font requests are properly redirected to
https://expandspace.com? Please advise if there’s a way to update all URLs to point to the live domain or fix the CORS issue effectively.Thank you!
The blog I need help with is: (visible only to logged in users)
- Regenerating CSS & Clearing Cache:
-
Hey! @expandspace
It looks like you managed to follow the suggestion in the shared bug report and the issue no longer occurs. The latest comment in the report also suggests this should be permanently fixed in a new update.
Let us know if you still need help! By the way, I noticed your site is on a paid plan so feel free to request our Expert Support for quicker responses in future.
- The topic ‘CORS Error with Google Fonts After Domain Transfer’ is closed to new replies.