This tutorial will teach you how to connect your Github Pages website to a custom domain

  1. Register a custom domain. If you don’t have one yet, you can use Freenom to get a free one.
  2. In Github navigate to the repository you wish to connect to the custom domain.
  3. Ensure The Setting source Is Set To master or /docs and press the save button
  4. The settings for choosing a custom domain will now be shown. Type the domain which you would like to use. I’d go with something like www.example.com or subdomain.example.com
  5. Press save.
  6. Now is the time to connect your domain to a DNS proxy such as Cloudflare.
  7. In your domain’s DNS settings, configure the following item.
Type Name Value
CNAME www USERNAME.github.io
  1. If you’re using a subdomain (for example subdomain.example.com) change www to the subdomain you chose.
  2. Also, replace USERNAME with the Github username of the repository owner.

This page was imported from the old blog with little to no modifications