// troubleshooting guide · aws cloudfront
CloudFront CORS Error: No 'Access-Control-Allow-Origin' Header
- Status
- Workaround available
- platforms:
- Chrome, Firefox, Safari, AWS Console
- updated:
- November 17, 2026
- reports:
- 6
- Method
- how we research
RUNBOOK · aws-cloudfront/cors-error4 FIXES
// quick answer
CORS fails behind CloudFront when the Origin header isn't forwarded or isn't part of the cache key, or when the origin's own CORS header overrides yours. Attach a CORS response headers policy (or forward Origin with CORS-S3Origin/CORS-CustomOrigin) and allow OPTIONS.
Most likely fix: Attach a CORS response headers policy
How to fix it
// try these in order, the most common fix is first
FIX 1Attach a CORS response headers policy
- 01Open the distribution > Behaviors > Edit
- 02Under Response headers policy choose a managed policy such as CORS-With-Preflight, or create one listing your allowed origins
- 03Enable Origin override if the origin sends conflicting CORS headers
- 04Save changes
Did this fix it?FIX 2Forward Origin and add it to the cache key
- 01In the same behavior choose origin request policy CORS-S3Origin (S3) or CORS-CustomOrigin (APIs)
- 02Use a cache policy that includes the Origin header in the cache key
- 03Invalidate affected paths so old responses without CORS headers are dropped
Did this fix it?FIX 3Allow OPTIONS for preflight
- 01Set Allowed HTTP methods to GET, HEAD, OPTIONS (or all methods for APIs)
- 02Under Cached HTTP methods, cache OPTIONS too if responses are static
Did this fix it?FIX 4Test the origin directly
- 01Run curl -I -H "Origin: https://your-site.com" https://origin-url/file
- 02Confirm the origin returns Access-Control-Allow-Origin; if not, fix the S3 CORS configuration or API first
- 03Repeat through the CloudFront URL to compare
Did this fix it?
Symptoms
Browser console shows 'blocked by CORS policy: No Access-Control-Allow-Origin header is present', often only for fonts or only for some users/edges.
Why it happens
- C-01Origin header not forwarded to the origin, so S3 or the API doesn't add CORS headers
- C-02Origin header not in the cache key, so a response cached without CORS headers is reused
- C-03OPTIONS not allowed on the cache behavior, so preflight requests fail
- C-04Custom response headers policy lists origins that don't match the request's Origin
- C-05Origin sends its own Access-Control-Allow-Origin and Origin override is off
// this guide also covers
- cloudfront cors error
- cloudfront no access-control-allow-origin header
- cloudfront cors fonts
- cloudfront response headers policy cors not working
Still not working?
If AWS CloudFront keeps failing, you're not alone. See every AWS CloudFront problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Cloudflare Error 521: Web Server Is Down (Cloudflare)
Fastly Error: Unknown Domain (Fastly)
Google Cloud Quota Exceeded Error (Google Cloud)
Netlify Page Not Found on Refresh (SPA 404) (Netlify)
Other AWS CloudFront errors
- CloudFront 403 Access Denied With S3 Origin
- CloudFront 403 Error: The Request Could Not Be Satisfied
- CloudFront Invalidation Not Working (Still Serving Old Content)
- CloudFront SSL Certificate Not Showing (ACM us-east-1)
- CloudFront 502 Bad Gateway Error
- CloudFront 504 Gateway Timeout Error
- CloudFront React App 403/404 on Page Refresh
- Why Is My CloudFront Bill So High?