Curtis Larson's Blog    Main Site    Portfolio     Archive     Feed

How to point a domain on Google Domains to GitHub pages

Table of Contents

  1. Introduction
  2. Setup repository
  3. Configure Google Domains
  4. Conclusion


When setting up my website on Google Domains I had to read through several different guides to figure out all I needed to do to point it to a GitHub pages repository. I wrote up this guide to simplify the processes for anyone else performing this same task.

Setup repository

Navigate to and create a repository with the name or and give it a nice description.

Create a repository

In your new repository, create a CNAME file in the root directory and add the following two entries (with curtismlarson replaced by your own domain):


These two entries tell GitHub to redirect any requests to to the domain specified in the CNAME file. There are two entries to ensure that will also redirect to If you prefer to have a site without the www prefix, you can switch the order of the domains.

Now verify that your domain is now pointing to your custom domain by going into the repository settings and verifying your GitHub Pages settings:

Github Pages

Configure Google Domains

Navigate to and select the DNS option to configure your DNS records.

Google Domains

Scroll to the very bottom of the page and add 3 Custom Resource Records. You need to add two “@” type A records that point to the GitHub ips and and one “www” CNAME record that points to your url:

Custom Resource Records


That’s it! DNS records often take more than a day to propagate so you may not see your website immediately. Once the changes have propagated your GitHub page and any project pages should be accessible from your new domain. For example is hosting the blog you are reading right now and the domain works without any additional setup.

Curtis Larson is a LA based freelance software developer. Follow him on Twitter or send him an email if you're looking for a talented developer.