Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite redirects with Cloudflare, S3, and Heroku SSL interactions #2

bmann opened this issue May 11, 2019 · 0 comments


Copy link

commented May 11, 2019

If you are using Cloudflare for your custom domains, and you’re using S3 with a Cloudflare hosted subdomain, and Heroku has a custom domain set with SSL turned on, your blog won’t load because of infinite redirects.

For https support for S3 buckets (e.g. pointing to, Cloudflare SSL setting must be “Flexible”: Cloudflare makes http requests to and then serves up over https.

Because Flexible is set, Cloudflare makes http requests to which is set on Heroku and Heroku by default sets up an SSL certificate and will redirect http requests to https, which causes infinite redirects.


  • turn off Cloudflare proxying for your custom domain
  • turn off SSL on Heroku

Neither of these are ideal, and is ONLY the case because you need to keep Flexible turned on to get https serving of S3 bucket subdomain (which you’re doing with Cloudflare because Amazon’s Cloudfront takes 53 steps to setup).

More reading on Cloudflare plus Heroku and Full SSL / Full SSL (Strict) is here

@bmann bmann added the Documentation label May 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.