- assuming you already have your domain, will use domain.com as example and you have your github pages, will use username.github.io as example
- register for cloudflare account
- get cloudflare nameservers for your domain, e.g xxx.ns.cloudflare.com and yyy.ns.cloudflare.com
- update dns settings for your domain with the cloudflare nameservers and check status (might take a while)
- cloudflare dns settings -> add 2 A records; name: domain.com, value 192.30.252.153 and value 192.30.252.154 as per github pages instructions
- cloudflare dns settings -> add cname record; name www, value (is an alias of) username.github.io
- cloudflare page rules -> domain.com/* forwarding URL https://www.domain.com/$1 301 permanent redirect
- cloudflare page rules -> http://www.domain.com/* Always use https
- settings on your github pages repo -> custom domain 'www.domain.com'
Created
May 3, 2017 12:43
-
-
Save ErikAndreas/3d25b288f3cd7c85f9f3875cc9e33ecb to your computer and use it in GitHub Desktop.
https via Cloudflare with github pages on custom domain with redirect to www
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment