Tips4Devs.com

BOOKS

Setting Up a Custom Google Domain on your Github Pages website

last updated on 2019-12-21

Let's get a domain

If you haven't already, go and purchase a domain on Google domains - which will likely cost you about $12 a year.

Once ready, navigate to the DNS section and setup the following custom resources records:

google DNS admin UI

This likely won't work on the first attempt, so go get a coffee refill as propagation of DNS records can take a few seconds to a few hours.

Great, you got more coffee! Now try running the following command in terminal to verify everything is now working:

dig +noall +answer tips4devs.com

When the DNS changes are ready, it should ouptup the following:

command line preview

Create a Github Repo and Setup Public Pages

Now create a new github project if you haven't already. Then navigate to your repository settings page, under Settings / Options and scroll down to GitHub Pages section.

github dns setup admin UI

Set your custom domain and press Save It should validate the setup.

At this point you should be able to check the Enforce HTTPS option.

For more detailed info, follow the official github doc

Join The Conversation