Is it possible to use HTTPS/SSL on GitHub Pages sites with a custom domain?

泄露秘密 提交于 2019-12-20 11:14:04

问题


Is there any way to use HTTPS/SSL on GitHub Pages sites that use a custom domain? SSL is recommended for better search engine ranking and there are a lot of other uses for it beyond that.


回答1:


SSL is supported by GitHub on sites using a *.github.io domain: https://help.github.com/articles/securing-your-github-pages-site-with-https/

I recommend registering with Cloudflare DNS so that you can set HTTPS up properly for a site on a custom domain, see Cloudflare's blog post for more info: https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/

Update (5/5/2018) SSL is now supported on custom domains: https://blog.github.com/2018-05-01-github-pages-custom-domains-https/

  1. Just go to https://github.com/username/repo/settings
  2. Check the below checkbox:



回答2:


It's now possible to use HTTPS on GitHub Pages sites with a custom domain

If you are using CNAME or ALIAS records for your custom domain, you’re all set and your site should be accessible over HTTPS.

If you are using A records, you must update your site’s DNS records with new IP addresses. Please see our guide to setting up your custom domain with Pages and update any A records you might have set.

Once you have HTTPS working:

You can optionally “Enforce HTTPS” for your domain in your repository’s settings, ensuring users who request your site over HTTP are upgraded to HTTPS.

You can read the full announcement here: https://blog.github.com/2018-05-01-github-pages-custom-domains-https/



来源:https://stackoverflow.com/questions/42172216/is-it-possible-to-use-https-ssl-on-github-pages-sites-with-a-custom-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!