Resolve DNS check: Add custom domain to Github page

It's frustrating when you bought a new domain and are not able to re-direct your portfolio website because of DNS check is unsuccessful. As like below.

A few times back, a similar thing happened to me when I wanted to add a custom domain to my GitHub-hosted portfolio website.

It took a while and a few searches over the internet to find the solution. So, I thought to writing it down then someone should not face a similar issue and should not waste time searching about this silly thing.

What needs to be done?

pre-check: Considering you have a domain name from the domain-name provider and it is activated and working fine.

In Github: Have a CNAME file with only your domain name written in it.

A correct domain name in 'Custom domain' field: <Github repo> -> Settings -> Pages


In the DNS setting of the domain name provider site:

Add settings: First entry

  • Host name= empty or domain name itself

  • type= A

  • TTL= 3600

  • Data= 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153

Second Entry

  • Host name= www or www.<domain name>

  • type= CNAME

  • TTL= 3600

  • Data= <github-page-name>

I have bought my domain from Google, here my domain is using Google Domains name servers which are used to identify my domain location on the internet.

Note: Changes are published immediately but may take some time to propagate.

It's working now! Hope it helps.