'S3 website hosting - Too Many Redirects

I have a React app served from an S3 bucket which is set up for static website hosting, behind a Cloudfront distribution, with a custom domain (https://dev.meal-plannr.com) managed by Route 53.

When I go to my custom domain or the Cloudfront URL I get a "Too many redirections" (Safari) or "dev.meal-plannr.com redirected you too many times." (Chrome). Going to the S3 bucket URL loads the website fine. Interestingly I only get the error in Chrome if I have the dev tools displayed - without that the website loads correctly on all URLs.

Here is the configuration for each of the services mentioned above.

S3

S3 static website hosting configuration

Cloudfront

Origin configuration:

Cloudfront origin configuration

General:

Cloudfront general configuration

Behaviours:

Cloudfront behaviours configuration

Error Pages:

Cloudfront error pages configuration

Route 53

Route 53 configuration

Up until around 30 minutes ago my S3 bucket was set up to redirect to https://dev.meal-plannr.com but I've since removed this. Have I misconfigured something?



Solution 1:[1]

I had the same issue after setting up a redirect for my S3 bucket. After clearing my Cloudfront Cache, everything was back to normal.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 LightningGalaxy