How to fix ERR_TOO_MANY_REDIRECTS on custom github pages domain?

不羁岁月 提交于 2020-06-26 12:38:48

问题


So I had github pages set up with a custom domain without problem on namecheap a day ago. Then I tried switching to Https via github's newly added support for https on pages. After too much frustration I switched over to CloudFlare for Https but I'm now getting an error ERR_TOO_MANY_REDIRECTS

Here's my DNS settings on CloudFlare.


回答1:


Check your SSL setting in the Crypto tab. You should have it set to "Full". If it is set to "Flexible", then Cloudflare will use HTTP to connect to the origin, even when the client browser connects to Cloudflare over HTTPS. GitHub is probably responding with a redirect to HTTPS in this case -- not realizing that the original client is already using HTTPS, and so this redirect creates a loop.




回答2:


More info here: https://support.cloudflare.com/hc/en-us/articles/115000219871

The two typical causes of redirect loop errors are:

  • Cloudflare SSL options that are incompatible with your origin web server’s configuration, and
  • Page Rule misconfiguration.


来源:https://stackoverflow.com/questions/50145231/how-to-fix-err-too-many-redirects-on-custom-github-pages-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!