Linking A Custom Domain To Github Pages

Posted by Praveen on August 23, 2022 · 1 min read


Make sure you have domain. I use Google Domains.


Go to Github repository. Then to settings and left side there should be an option called Pages. In which enter your domain name and save.

Note: You may need to put a CNAME file in your repo just with the domain name.


Now go to DNS management (in my case its Google domains) in your domain provider site and set the following Records.

Host = www; Type = CNAME; TTL = 600 (10 Mins); Data =

Then create four more additional records in the same console.

Name = @ (Or Keep Empt); Type = A;
Value=;;; (Create under same name); TTL = 600

Save that and wait some time till the DNS propagation.