How to set up Github Pages with Google domains

Luis L
Luis L
Apr 11, 2017 · 3 min read

You are writing the last line of code on your awesome webpage, now you want the world to see it. Or you are a first time user of Github pages, it can be confusing at first. I read many helpful tutorials that helped me but I just wanted to write my own that hopefully will help someone set up their page too.

First make a Github page

First create a repo just call it whatever you’d like. In this example I called it “awesome-website”. Github has a pretty good page on how to do this, I’d recommend using that tutorial. Once you’ve made your Github page you’ll be ready to set up your Google Domain with Github pages.

Setup Google Domain name

Now, to the reason I wrote this. Go to google domains and buy a domain.

Go back to Github …

Create another file. This is the CNAME file that simply has the domain name. In this case I added the apex name or “” and the other is the “www” subdomain added to the root domain which is “”.

Note: the apex name is also the root name. It is called other things too.

Then write a commit message and save it. Next look in settings and see that the name is different.

So far your page should look like this. It still needs to be configured in your Google Domains settings.

Note: Once you’ve configured the DNS, the website url will turn green.

Now lets go configure your domain …

In your dashboard click on the third option that says configure DNS and then head over to the “Custom resource records” section.

Image for post
Image for post

This is what you want your configuration to look like. Once you add your Github path, as seen in this example (it adds “” automatically, this is not seen in this picture).

Wait a second before celebrating: These changes may take a bit longer that you would expect. It can range anywhere from an hour to 48 hours.

That’s It!

Your awesome website has the name you gave it and you can share it with everyone.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store