Step by Step: How to Use Your Google Domain for Your GitHub Pages Site

Charles Timmons
4 min readOct 31, 2020

If you haven’t already purchased your domain name, then I highly recommend that you do so. I had already purchased charlestimmons.com some time ago before I even knew for sure that I would have the need for a personal website.

screen shot of my website
Yes, this is what my website looked like at the time I wrote this guide.

Do not fret if your name is already taken. You can always use some variation of your name using initials, your middle name, or a handle that you go by. One word of advice: look carefully at how your domain name reads. Since every word will be smashed together into one string of characters, you should avoid any ambiguity that could lead to some embarrassing pronunciations of your website. I want to keep this article professional, but I’m sure that you could think of some examples.

Google Domains Logo
Check out this beautiful logo designed by Joshua Levi.

Why Google Domains?

I picked Google Domains, because I wanted to purchase my domain and just forget about it. I can manage it with my Google account, which means one less log-in to worry about for me. Plus, I don’t expect Google to go anywhere anytime soon. It costs me $12 a year, and it automatically renews.

If you’d also like to use Google Domains, get started here.

Why GitHub Pages?

Call me crazy, but I want to attempt to build my own personal site from the ground up. I feel that I will gain a better understanding of the different languages used in building a website if I take a more active role than simply applying a WordPress or Wix theme. Look into GitHub Pages here.

By the way, GitHub Pages is free.

GitHub Pages also allows you to generate a static website with Jekyll. This may be a better option for you if you would like to get a simple theme up and running without too much coding.

Let’s set up your custom domain. It’s surprisingly quick and easy.

Step 1

Go to your Google Domains registrar and select “Manage” by your domain.

On the next page, use the menu on the left to navigate to the DNS settings. Scroll down to the “Custom resource records” section.

Here, you must enter the A record for GitHub Pages. The @ symbol refers to the root directory of your website. Use the + to add multiple IPs for the record. I recommend making sure that you are using the latest IPs by checking this page (You can find this information at step four under “Configuring an apex domain”.).

Step 2

Add a CNAME record as shown below. Enter your assigned GitHub Pages URL in the IPv4 address field.

Step 3

Navigate to the settings of your new website’s repository. Scroll down until you get to the section titled GitHub Pages.

screenshot of github pages settings

Type your domain name into the highlighted section, and save it. Be sure to enter the subdomain (in this case, www.charlestimmons.com) instead of the apex domain (charlestimmons.com).

At this point, it may take a day for your website to be published at your custom domain. If you’d like to enable HTTPS, come back at this time and check the box. If this doesn’t work right away, retype your custom domain and hit save. It may take a few minutes for the certificates to be verified, and then you should be able to check the “enforce HTTPS” box.

Step 4

At this point, I recommend creating a CNAME file in the root of your repository. Make sure that CNAME is in all caps and has no file extension.

Simply type the domain that will map to your GitHub Pages site and commit the file.

Thank you for reading. If you have any issues, remember that the documentation is your friend. I have no incentive to recommend any of the services listed here. These just work for my purposes.

Please comment if this helped you or if you ran into any issues. Constructive criticism is always appreciated as well. Enjoy playing around with your fancy custom domains! 😸

--

--