Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I couldn't get CloudFlare's SSL to work with GitHub Pages when I tried it because of some DNS issues. Do you have that working?


I think your sites need to be "on" cloudflare (i.e., the cloud icon in the DNS settings page needs to be orange and not grey) for other features like SSL and Page Rules to work. Specifically for Github Pages I configured both my apex custom domain and my www subdomain to point to myusername.github.io. Cloudflare will automatically follow myusername.github.io and return the origin IP when requests are made to the apex custom domain, something they call CNAME flattening, and similar to the ALIAS and ANAME records offered by other DNS providers. Plus I set SSL as "Full" but NOT "Full(Strict)" as the latter won't work with Github Pages' servers. There are some anecdotal reports I've read saying that for some Github Pages sites even Full SSL doesn't work, so if that's the case you can try Flexible SSL which should work in all cases. And of course as the other responder said, don't forget to redirect all your http requests to https using a Page Rule along the lines of http://*mydomain.com/* --> 301 redirect --> https://[www].mydomain.com/$2

Hope that helps.


I do. I just enabled CloudFlare's SSL, added a redirect rule from unsecured http to SSL in CF (there is a template I think) and adjusted the base URL in the YAML file of the repo accordingly. I don't believe I did anything else.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: