Skip to content

Instantly share code, notes, and snippets.

@prvn-pa
Created July 5, 2021 16:04
Show Gist options
  • Select an option

  • Save prvn-pa/1cc7432597e23da53a761fa2c3eef9e0 to your computer and use it in GitHub Desktop.

Select an option

Save prvn-pa/1cc7432597e23da53a761fa2c3eef9e0 to your computer and use it in GitHub Desktop.

Linking A Custom Domain To Github Pages

STEP 1

Make sure you have domain. I use Google Domains.

STEP 2

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

STEP 3

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 = username.github.io

Then create four more additional records in the same console.

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

Save that and wait some time till the DNS propagation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment