GitHub Pages is easy to setup your owm blog with Hugo or another frameworks, but to a custom domain with Google Domains, you may run into some problems.

Here is how you can do it in below steps:

Step 1: Let GitHub Pages know your custom domain

  • Go to your github repo settings page.
  • Add you custom domain name at Settings > GitHub Pages > Custom domain.

Step 2: Go to your domain provider points your domain to GitHub Pages

  • Go to registar page on your google domains, select your domain.
  • Go to DNS > Custom resource records.
  • Add the record shown in the screenshot bellow. Note that you need to use the “+” button to add more urls.

Here is the list of ips in the screenshot:

Step 3: Let your www sub-domain point to your GitHub Pages

  • Add the following CNAME record.
  • Add a CNAME file, it contents your domain in your Hugo static folder.

Step 4: Enable HTTPS for your GitHub Pages

  • Go to your github repository settings page, under Settings > GitHub Pages > Custom domain(remove and add it back and save again) > Check Enforce HTTPS checkbox.