首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >github pages 开启 https 及配置 www

github pages 开启 https 及配置 www

作者头像
iOSDevLog
发布2019-05-17 16:17:52
1.1K0
发布2019-05-17 16:17:52
举报
文章被收录于专栏:iOSDevLogiOSDevLog

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019.05.13 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 配置 www 域名
  • 开启 https
  • 测试一下
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档