2

I have public S3 bucket exposed via CloudFront to S3 A record for www.mezinamiridici.cz.

https://www.mezinamiridici.cz/ - works http://www.mezinamiridici.cz/ - redirects to https://www.mezinamiridici.cz/

Then I created another S3 bucket named mezinamiridici.cz with a https redirect to www.mezinamiridici.cz. When I pointed A record to the S3 bucket URL, the state was:

http://mezinamiridici.cz/ - works https://mezinamiridici.cz/ - request froze

So I created new distribution in CloudFront:

Alternate Domain Names (CNAMEs) mezinamiridici.cz SSL Certificate mezinamiridici.cz

I exposed it in A record - it was not offered automatically, I had to enter the cloudfront URL manually.

Both http://mezinamiridici.cz/ https://mezinamiridici.cz/ returns now:

AccessDeniedAccess Denied4087CD619CBEED72

How can I make a redirect with out www prefix for both http and https protocol?

Some resources I used:

https://medium.com/faun/redirect-naked-domain-to-www-with-https-on-aws-route-53-e620e4ce989d https://mountainseo.co.uk/blog/domain-redirect-using-aws-route-53/

Route 53

enter image description here

S3 bucket, public

enter image description here

CloudFront

enter image description here

I have seen similar questions about configuration of non-www site / Access denied but they either were obsolete or did not help me. It is frustrating that I cannot find a concrete reason why the access denied is thrown. CloudWatch is empty.

Leos Literak
  • 305
  • 4
  • 13

0 Answers0