Fixing CORS Errors
On this page
CORS (Cross-Origin Resource Sharing) errors occur when resources (fonts, scripts, images) load from a domain or subdomain different from your primary domain. These errors often happen:
- After migrating a website.
- If the URLs (e.g., www vs. non-www) do not match the primary domain.
- If resources load over HTTP instead of HTTPS.
This guide explains how to resolve CORS errors using Staq tools.
Common Causes of CORS Errors
- Primary Domain Mismatch:
- Example: Resources load from
https://example.cominstead ofhttps://www.example.com.
- Example: Resources load from
- Outdated Resource Links:
- Example: HTTP links instead of HTTPS.
- Cached Files:
- Theme, plugin, or server-side caches retain incorrect URLs.
Step-by-Step Solutions
1. Verify and Update Resource URLs Using Search & Replace
To perform a Search & Replace in the database, you have two options:
Option 1 – Via Staq Panel
- Go to the site’s Staq Panel.
- Under Databases, click Search & Replace.

- Use the Search & Replace tool to replace outdated URLs:
- Example:
http://example.com→https://www.example.com.
- Example:
Option 2 – Via WordPress Backend
- Log in to the website backend.
- Hover over Staq Hosting in the top toolbar → Select Settings.
- Go to Advanced → Search & Replace.

- Replace the incorrect URLs with the correct ones.
2. Clear Staq Cache and Redis Object Cache
Clear Staq Cache:
- In WordPress backend → Hover over Staq Hosting → Click Clear Site Cache.
- OR in the Staq Panel → Under Files, click Cache → Click Clear Cache.
Flush Redis Object Cache:
- Go to the site’s Staq Panel → Under Database, click Redis Object Cache → Click Flush.
- OR in WordPress backend → Go to Staq Hosting → Object Cache → Click Flush Cache.
3. Reset Theme and Plugin Caches
Certain themes store cached URLs. Reset caches as follows:
| Theme/Page Builder | Cache Clearing Instructions |
|---|---|
| Avada | Go to Avada → Options → Performance → Reset Avada Caches. |
| Divi | Go to Divi → Theme Options → Builder → Clear Static CSS File Generation. |
| Elementor | Go to Elementor → Tools → Regenerate CSS. |
| Beaver Builder | Go to Settings → Beaver Builder → Cache → Clear Cache. |
| Bricks Builder | Go to Bricks → Settings → System → Clear Cache. |
4. Verify CORS in Browser Developer Tools
- Open Developer Tools in your browser (right-click → Inspect → Console).
- Check for CORS errors (e.g., font or script file blocked).
If the issue persists, ensure all URLs are consistent and contact Staq Support for server-side fixes.
Need some help?
We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.