是否可以在具有自定义域的GitHub Pages网站上使用HTTPS / SSL?

时间:2017-02-11 04:24:33

标签: ssl github github-pages

有没有办法在使用自定义域的GitHub Pages网站上使用HTTPS / SSL?建议使用SSL以获得更好的搜索引擎排名,除此之外还有很多其他用途。

2 个答案:

答案 0 :(得分:17)

使用*.github.io域名的网站上的GitHub支持SSL:https://help.github.com/articles/securing-your-github-pages-site-with-https/

我建议您注册Cloudflare DNS,以便为自定义域中的网站正确设置HTTPS,有关详细信息,请参阅Cloudflare的博文:https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/

更新(5/5/2018) 自定义域现在支持SSL:https://blog.github.com/2018-05-01-github-pages-custom-domains-https/

  1. 只需转到https://github.com/ 用户名 / repo / settings
  2. 选中以下复选框: enter image description here

答案 1 :(得分:3)

现在可以在带有自定义域的GitHub Pages网站上使用HTTPS

  

如果您对自定义域名使用CNAMEALIAS条记录,您已全部设置,且您的网站可通过HTTPS访问

  

如果您使用的是A条记录,则必须使用新的IP地址更新网站的DNS记录。请参阅我们的guide to setting up your custom domain with Pages and update any A records you might have set

使用HTTPS后:

  

您可以在存储库的设置中选择“Enforce HTTPS” for your domain,确保通过HTTP请求您的网站的用户升级到HTTPS。

Enforce HTTPS repository configuration

您可以在此处阅读完整的公告:https://blog.github.com/2018-05-01-github-pages-custom-domains-https/