- Newest
- Most votes
- Most comments
It seems you're encountering a 403 error when trying to access your website using the custom domain name. This issue can occur due to several reasons. Let's go through some potential causes and solutions:
-
CloudFront Configuration: Make sure you've added your custom domain name (www.blan.ind.br) as an Alternate Domain Name (CNAME) in your CloudFront distribution settings. Without this, CloudFront won't recognize requests coming from your custom domain.
-
SSL/TLS Certificate: Ensure you have a valid SSL/TLS certificate for your custom domain attached to your CloudFront distribution. This certificate should be issued by AWS Certificate Manager (ACM) in the US East (N. Virginia) region.
-
Route 53 Configuration: Verify that your A record in Route 53 is correctly set up as an alias record pointing to your CloudFront distribution, not directly to the S3 bucket.
-
DNS Propagation: After updating your DNS settings at registro.br, it may take some time (up to 48 hours) for the changes to propagate globally. Be patient and keep checking.
-
S3 Bucket Policy: Ensure your S3 bucket policy allows CloudFront to access the content. The policy should include permissions for the CloudFront Origin Access Identity (OAI) or Origin Access Control (OAC).
-
CloudFront Cache: Try clearing the CloudFront cache by creating an invalidation for all objects ("/*") in your distribution.
-
Browser Cache: Clear your browser cache or try accessing the site from an incognito/private browsing window.
If you've confirmed all these settings are correct and you're still experiencing issues, you may need to double-check the exact error message in the CloudFront logs or contact AWS support for further assistance.
Remember to allow some time for DNS changes to propagate fully before concluding that the configuration isn't working.
Sources
Cloudfront cannot access s3 bucket | AWS re:Post
Configured Route53 URL is not working with Cloud Front URL | AWS re:Post
Add an alternate domain name - Amazon CloudFront
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 8 months ago
