This tutorial guides you step by step through setting up a custom Google domain on Github pages website.
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:
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:
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
Options and scroll down to
GitHub Pages section.
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