美文网首页
github pages 开启 https 及配置 www

github pages 开启 https 及配置 www

作者: iOSDevLog | 来源:发表于2019-05-13 15:53 被阅读0次

https://help.github.com/en/articles/adding-or-removing-a-custom-domain-for-your-github-pages-site

配置 www 域名

Setting up a www subdomain

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

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

github pages.png

开启 https

https://help.github.com/en/articles/securing-your-github-pages-site-with-https
https://help.github.com/en/articles/setting-up-an-apex-domain

  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 了。

测试一下

输入 www.iosdevlog.comiosdevlog.com 都会跳转到 https://www.iosdevlog.com/

iosdevlog.com.png

参考:https://help.github.com/en/articles/using-a-custom-domain-with-github-pages

相关文章

网友评论

      本文标题:github pages 开启 https 及配置 www

      本文链接:https://www.haomeiwen.com/subject/zbtraqtx.html