// 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
Share

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

  1. FIX 1Attach a CORS response headers policy

    1. 01Open the distribution > Behaviors > Edit
    2. 02Under Response headers policy choose a managed policy such as CORS-With-Preflight, or create one listing your allowed origins
    3. 03Enable Origin override if the origin sends conflicting CORS headers
    4. 04Save changes
    Did this fix it?
  2. FIX 2Forward Origin and add it to the cache key

    1. 01In the same behavior choose origin request policy CORS-S3Origin (S3) or CORS-CustomOrigin (APIs)
    2. 02Use a cache policy that includes the Origin header in the cache key
    3. 03Invalidate affected paths so old responses without CORS headers are dropped
    Did this fix it?
  3. FIX 3Allow OPTIONS for preflight

    1. 01Set Allowed HTTP methods to GET, HEAD, OPTIONS (or all methods for APIs)
    2. 02Under Cached HTTP methods, cache OPTIONS too if responses are static
    Did this fix it?
  4. FIX 4Test the origin directly

    1. 01Run curl -I -H "Origin: https://your-site.com" https://origin-url/file
    2. 02Confirm the origin returns Access-Control-Allow-Origin; if not, fix the S3 CORS configuration or API first
    3. 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 us

Watch AWS CloudFront Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other AWS CloudFront errors

All 12 AWS CloudFront errors and fixes →