Skip to content

erabossid/github-custom-domain-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-custom-domain-config

Full guideline for using custom domain to any github repository.

Step 1

Open your repositoy and click on Settings

Repo

Step 2

Under the Github Pages -> Source, click on None, then select master or another branch, then Save it

Select Page Branch

This will publish your project with github-pages via selected branch. So, your site is live now at https://username.github.io/projectname. Now we will set custom domain to our github project. But before that we will edit our main domain DNS configuration. Who already have a branch published will skip the step 2.

Step 3

Add / point the following IP addresses to your custom domain in DNS zone with A record

  • 185.199.108.153
  • 185.199.109.153
  • 185.199.110.153
  • 185.199.111.153

Open DNS zone dns-zone

Then add the ips add-github-ips

Step 4

Come back to your repository Settings-> Github Pages, then put your domain name to this field and click on Save

Put your domain name

Step 5 (fix https issue and review)

After the step 4, your github page will be published with your custom domain name. When you'll visit github project link like https://tradecoder.github.io/github-custom-domain-config and when you'll visit your custom domain like https://tradecoder.com, for both the cases it will load with your custom domain name. It may take few minutes to get effective.

And if you find in the section of Github Pages that https is not active, it may take upto 24 hours to be active. If not, you may have to remove and add the domain in the github page again. force-https

Releases

No releases published

Packages

No packages published