github pages 开启 https 及配置 www

help.github.com/en/articles…ios

配置 www 域名

Setting up a www subdomaingit

To set up a www subdomain, such as www.example.com you must configure a CNAME record with your DNS provider.github

警告:若是您的域启用了 HTTPS 强制实施,GitHub Pages 的服务器将不会自动路由重定向。您必须使用 www 域名注册商配置子域名和根域重定向。服务器

github pages.png

开启 https

help.github.com/en/articles… help.github.com/en/articles…dom

  1. 添加 A 记录,至少有一条 A 指向如下 ip 地址。
  2. 添加 wwwCNAME 记录,指向 github pages 地址。
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
复制代码

DNS.png

若是 Enforce HTTPS 不可开启,先把 Custom domain 清空保存,再填入以前的地址,如 www.iosdevlog.com,等上 1,2 分钟应该就能够开启 https 了。ide

测试一下

输入 www.iosdevlog.comiosdevlog.com 都会跳转到 www.iosdevlog.com/测试

iosdevlog.com.png

参考:help.github.com/en/articles…spa

相关文章
相关标签/搜索