目录

自定义 github pages 域名

添加 A 记录

在域名服务商处,添加四条 A 记录:

1
2
3
4
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

查看是否解析成功(EXAMPLE.COM 替换为自己的域名)

1
dig EXAMPLE.COM +noall +answer

成功的话,会有如下记录

1
2
3
4
> EXAMPLE.COM     3600    IN A     185.199.108.153
> EXAMPLE.COM     3600    IN A     185.199.109.153
> EXAMPLE.COM     3600    IN A     185.199.110.153
> EXAMPLE.COM     3600    IN A     185.199.111.153

启用 https

若 Enforce HTTPS 选项,无法勾选,并且提示: Not yet available for your site because the certificate has not finished being issued.

等待 24 小时吧,然后就可以勾选了。

> Managing a custom domain for your GitHub Pages site - GitHub Help