Configure https for websites through CloudFlare

This site is hosted on Github Pages and built using Hexo. The original domain name is symeonchen.github.io , there is Github’s SSL certificate, but after pointing to the custom domain name, the certificate’s URL is not matched and becomes HTTP access. CloudFlare was finally used as a proxy to successfully open HTTPS for the whole station.

Step

  1. Purchase a domain name
  2. Register to [CloudFlare] (https://www.cloudflare.com/), step by step, and point the DNS service provided by the domain name service provider to CloudFlare.
  3. Configure it. It is recommended to enable Always Use HTTPS in Page Rules and HSTS in Crypto.

The domain name symeonchen.com was bought at [GoDaddy] (https://sg.godaddy.com/zh/). GoDaddy’s DNS service is too slow, so it was originally hosted on [DNSPod] (https://www.dnspod.cn) /). CloudFlare’s service is now used, so the DNS is moved from DNSPod to CloudFlare. The free plan is sufficient and the speed is good. Although the transmission between Github and CloudFlare is still insecure, CloudFlare and the visitor have successfully used HTTPS.

Domain name provider, instead point to

hera.ns.cloudflare.com

and

jeff.ns.cloudflare.com

Then set the CNAME of DNS in CloudFlare and point www to symeonchen.github.io. If you have previously set up a custom domain name for Github Pages at another domain name provider, CloudFlare will automatically set the CNAME and root directory configuration, which is very user-friendly.