Here’s a boilied down method to configure add a custom domain (e.g., to your github pages website (e.g.,

Step 1

Buy a domain (e.g., I used, but you can use any number of domain name registries.

Step 2

In your repository Settings, add the domain you purchased in Step 1 to the “Custom domain box”:

custom domain with github pages tutorial

Make sure you do Step 2 before Step 3, for security reasons outlined in the Official Github docs.

Step 3

In your DNS Management console, add a CNAME record with the following parameters:

  • type = CNAME
  • name = www
  • value =
custom domain with github pages tutorial

Meaning: This tells your DNS to point requests towards the site hosted at Set the TTL (time to live) to an hour or less.

Next, in your DNS Management console, add 4 separate A records with the following information:

  • type = A
  • name = @
  • points to (value) = IP
custom domain with github pages tutorial

For IP, supply the Github IP addresses that host your site. As of writing (2019-11-15) these IPs are:

However the values might have changed since the time of writing. See the offical docs for the most up-to-date values.

Meaning: “A” records connect your domain name (hosted by your DNS) to the actual IP addresses where your site lives on a server (at Github).

Step 4

Nagivate to to see your github page! Be patient if it doesn’t immediately show. This lag is related to DNS propogration.

Here are three resources I found helpful while doing this:

  1. Offical docs
  2. An unoffical guide.
  3. Nice explanation of A records