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

相關文章
相關標籤/搜索