The Three Musketeers

2018-04-01

Have you ever heard of GitHub Pages? Yes, no? Well, GitHub Pages let you host your static website files on their servers for free. All you have to do is to create a git repo, push your files and point your domain to it. But how do you do that? Sounds all quite easy, but there are a few steps to follow in order to make you happy at the end.

TLDR

GitHub Pages

The First Musketeer - Domain Registrar

The Second Musketeer - Cloudflare

  • Create a free account at cloudflare
  • Add your domain to it
  • Go back to the registrar and add the cloudflare nameservers to your domain
  • Set two A records in the DNS settings to the GitHub Pages servers (192.30.252.153 / 192.30.252.154)
  • Create a CNAME record with the name www in the DNS settings which points to your GitHub Pages repo (eg. yourreponame.github.io)
  • To use SSL for your site, go to the Crypto menu and set the SSL to Full

The third Musketeer - GitHub Pages

  • Create a GitHub Pages repo and add your domain name as custom domain (Settings —> GitHub Pages -> Custom domain)
  • Push your website code (files) to you repo

Full step by step documentation

If you need a step be step guide for setting up things, here is a good one.


Comments: