Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Cloudfront redirected you too many times

I have a problem with redirects in cloudfront.


  • I configure Cloudflare two NS in my webpanel first.

I follow this steps after this:

https://stackoverflow.com/a/42869783/3332734

enter image description here

  • In cloudfront I pointed my two buckets.
  • In my two buckets, I set hosting website and redirect with bestdestiny.panel.adm.br with https prefix

See my buckets config below:

enter image description here

enter image description here

and each bucket has the respective policy rule:

enter image description here

And this is my cloudfront config below:

enter image description here

enter image description here

but...

enter image description here

like image 930
Francis Rodrigues Avatar asked Oct 17 '25 10:10

Francis Rodrigues


1 Answers

It appears that the root of your issue is a redirect loop. You've set up CloudFront to direct requests to an S3 bucket, and simultaneously, you've instructed the S3 bucket to redirect requests back to the very same CloudFront distribution. This creates a continuous loop of redirects.

While you mentioned two buckets in different regions, it's unclear why they were set up this way, especially since the reference you provided is about creating two separate sites (one with www and another without).

If your intention is not to create two sites, it might be best to reconsider the redirect configuration in your S3 bucket.

like image 162
Lee Hannigan Avatar answered Oct 19 '25 14:10

Lee Hannigan