1 Answer
- Newest
- Most votes
- Most comments
0
In Route 53, example.com
and www.example.com
should be A
records/Aliases with a value to your CloudFront distribution host, something like: d1234567890.cloudfront.net
.
From a command prompt, try this command to see what SSL/TLS is seeing:
openssl s_client -connect www.example.com:443 -prexit
Also, for Origin access, it is best to use Origin access control settings
.
Make sure that the slash is not included in the root object:
Enter only the object name, for example, index.html. Do not add a / before the object name.
Also, you can turn on access logging on the bucket to see the requests that are coming in to help troubleshoot.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 5 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 8 months ago
Ok, I changed the records in Route 53 and now
https://www.example.com/index.html
&https://example.com/index.html
work. The result ofopenssl s_client -connect www.example.com:443 -prexit
isI fixed my Origin access to
Origin access control settings
and updated the s3Bucket policy
with the policy that cloudfront suggested under Origin access > Bucket policy > Copy policy. Now, when I gohttps://www.example.com
andhttps://example.com
I receive a 403 error on f12 on thewww.example.com
andexample.com
files. So the complete summary of the browser response is as follows -https://www.example.com
- 403 errorhttps://example.com
- 403 errorhttps://www.example.com/index.html
- displays correctlyhttps://example.com/index.html
- displays correctlyhttp://www.example.com
- redirects tohttps://example.com
- 403 errorhttp://example.com
- redirects tohttps://example.com
- 403 errorhttp://www.example.com/index.html
- redirects tohttps://www.example.com/index.html
- displays correctlyhttp://example.com/index.html
- redirects tohttps://example.com/index.html
- displays correctly