Custom HTTPS domain on Github Pages with CloudFlare
Prepare
- Register a account on CloudFlare and buy a domain.
- Make sure you have created your Blog on Github Page. If you haven’t started a Blog yet, check out the previous post.
CloudFlare
- Goto your domain.

- Goto DNS page.

- Add two record,
A&CNAME

TheNameinAis your domain name (xxx.com). TheContentinAis your Github Page’s IP, and you can opencmdand enterpingto get the IP.

TheNameinCNAMEis www. TheContentinCNAMEis your Github Page. - Goto SSL/TLS > Edge Certificates page, and check
Always Use HTTPS

Github Page
- Goto Setting > Pages, and enter your domain in
Custom domainand Save.

Final
- Open the Blog folder and goto the
sourcefolder.

- Create a
CNAMEfile under thesourcefolder.

- As shown, enter your domain name.

- Finally,
hexo gandhexo dwere re-uploaded to Github.
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.




