How to add a Custom Domain on Github Pages



How to add a Custom Domain on Github Pages

How to add a Custom Domain on Github Pages

In this video, you will learn how to register a custom domain using google domains and add it to your github pages.

First, you will need to have your github web page ready. If you don’t know how to host your static website on github pages, check out this video:
https://youtu.be/OltY8JIaP-4

The steps are as followed:
1. Have your website already hosted on github pages.

2. Purchase a custom domain. In this tutorial, we purchase a domain on Google domains at: https://domains.google/

3. Go to your domain provider and click on the custom domain that you want to use. In this case, go to https://domains.google.com/registrar/

4. Go to the DNS settings and add the following custom A type records:
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site

For the first set of custom records, select A type and add the following ip addresses one by one in the data field:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

For the second set of custom records, type www for host name, select A type, and add the same data.

5. After you’ve added the custom records to DNS, go to your github repo of your website. Click on settings, and then pages. Scroll down to custom domain and add the domain that you purchased. Save and wait a few minutes. Make sure it says DNS check successful.

6. Wait 10-20 minutes (possibly longer) and clear your cache. Now, type in your custom domain and you should see your github web page loaded.

Check out my game programming web project tutorials playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4bLhA-st9sC4ZthyV7nsL2Q

https://www.kennyyipcoding.com/

Comments are closed.