Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

A while back I wrote about how to fix the DNS records could not be found error in Google App Engine. Well it turns out, depending on your app.yaml settings and the rest of your certificate configuration, you could end up introducing an ERR_TOO_MANY_REDIRECTS loop for your website in a web browser. This is a simple thing to fix too, here's how.

This post is largely thanks to Egidio Caleiro Santoro and his comments on my earlier blog post.
ERR_TOO_MANY_REDIRECT2.png


If you have your CloudFlare security setting (SSL/TLS tab) set to Full or Full (Strict) and your app.yaml handler has secure set to always e.g. "secure: always", a redirect loop can arise. A temporarily workaround is to set secure to optional until you resolve these redirection issues.

In the above case a redirect loop should not typically occur since CF will contact your origin server using HTTPS, with secure set to always, GAE will respond over HTTPS too, no redirects are done. However if some of the old settings and DNS entries are still not in effect, redirections to HTTP could occur at some point in the communications.

CF has a good article explaining how to remove these redirect loops. Whenever dealing with DNS changes, it's always a good idea to wait 24-48 hours for all configurations to propagate (yes it should be quicker but sometimes waiting is the only option). At that point both CF and GAE security settings should be set to Full and always, respectively.



-i

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...