如何幫GitHub Pages設定自定域名

Yanwei Liu
Sep 2, 2018 · 3 min read

#20190806更新
如何幫Github Pages的網域啟用HTTPS

本篇文章將以個人經驗為例,並假設各位讀者已經將頁面上傳至Github

流程說明

1.購買網址
2.建立新Repo,並且Push檔案到GitHub
3.開啟GitHub Pages功能
4.到購買網址的管理後台設定A記錄(填入185.199.108.153)

  • 185.199.108.153
  • 185.199.109.153
  • 185.199.110.153
  • 185.199.111.153
至網域公司的DNS設定,將上方185.199開頭的任一組IP輸入,記錄類型選擇A(A記錄),並儲存
回到Github,前往此專案的Settings頁面
把你申請的網域輸入並且儲存,就大功告成了

要注意的是,DNS生效需要一段時間,所以請耐心等待吧


Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade