Alternate CNAME incorrectly configured
- What happens
- You created the DNS record but did not add the CNAME to the distribution, so the request returns 403
- What to check
- The Alternate domain names list on the distribution matches the hostname in DNS
Fix a CloudFront 403: alternate domain name missing, AWS WAF block, origin firewall, S3 access, geo restriction, signed URLs or stacked distributions.
A CloudFront 403 means the viewer isn't authorized for the requested resource. AWS lists seven common causes: an alternate domain name (CNAME) not added to the distribution, AWS WAF blocking, a custom origin returning 403, an S3 origin denying access, geographic restrictions, signed URL or cookie requirements, and stacked distributions. Test the origin directly to split CloudFront from origin causes.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
aws cloudfront get-distribution-config --id E1234EXAMPLE \
--query 'DistributionConfig.Aliases'If your hostname is missing from that list, add it to the distribution. The DNS CNAME pointing to the CloudFront URL is only half of the setup; AWS says the other half is adding the CNAME to the distribution configuration.
Test the distribution's own domain name as well as your custom hostname. If only the custom hostname returns 403, suspect the alternate domain name setup.
For a custom origin, AWS says to make the request straight to it. If you can reproduce the error without CloudFront, the origin is the cause; read its logs.
If a web ACL is attached, look at its rules for a blocked request. AWS points to web ACL and testing-and-tuning guidance for this.
For an S3 origin, check the bucket policy for the OAI or OAC, the object key, and the origin domain type.
Review geographic restrictions and the Restrict viewer access setting on the behavior.
The S3 side is covered in S3 Access Denied, including Block Public Access and policy evaluation. AWS also notes that this CloudFront error differs from the 403 you get when accessing S3 directly, so check both the distribution and the bucket.
Google treats a 4xx other than 429 as content that doesn't exist, and removes a previously indexed URL from its index. 401 and 403 don't change the crawl rate. A geographic restriction or a WAF rule that returns 403 to Googlebot's locations or user agent can therefore remove pages from search. See 4xx errors and Google's page on how HTTP status codes affect its crawlers. For the CDN concept see CDN.
4 questions people ask next, answered from the sources on this page.
If you created the DNS CNAME but did not add the alternate domain name to the distribution configuration, the request returns a 403. Add the CNAME to the distribution, and keep the DNS record pointing to the CloudFront URL.
For a custom origin, make the request directly to the origin. If the error reproduces without CloudFront, the origin is the cause. If AWS WAF sits in the path, CloudFront can't distinguish its 403s from your origin's, so check the web ACL for a blocked request.
Yes. If you enabled geographic restrictions (geoblocking), blocked users receive a 403 error.
Common reasons are no OAI or OAC on a private bucket, a wrong path, a missing object, the Host header forwarded with the REST API endpoint, or custom error pages. Check the bucket policy and the origin type.
Run the free audit, then approve the fixes. Every change can be undone.