How To Verify GitHub Custom Domain On CloudFlare

How To Verify GitHub Custom Domain On CloudFlare

這篇介紹How To Verify GitHub Custom Domain On CloudFlare。

詳細步驟

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
最近新建網站,想購買新網域綁在GitHub服務上。
首先去賣網域的服務商,購買你想要的domain。
接著登入GitHub -> Settings -> Pages -> Add Domain
-> 輸入domain後,會需要經過驗證步驟如下:
1. Create a TXT record in your DNS configuration for the following hostname:
_github-pages-challenge-{your domain}.{your domain}.com
2. Use this code for the value of the TXT record: {code}
3. Wait until your DNS configuration changes. This could take up to 24 hours to propagate.

我這邊是使用CloudFlare CDN服務~
1. CloudFlare註冊帳號 -> add site -> 填入剛購買的domain
2. 在domain購買網站輸入 DNS Servers -> 通常有兩組 xxxxxx.ns.cloudflare.com
3. 在DNS設定中,新增一組TXT name:_github-pages-challenge-{your domain}.{your domain}.com
value:{code}
新增完後,再去GitHub後台讓驗證通過
4. 接著按照https://davidchenblog.com/posts/76881ca3 這篇做完設定~
5. 需要等待時間讓DNS Server設定生效