为Github Pages中托管的Jekyll Blog设置自定义子域 [英] Set up custom subdomain for Jekyll Blog hosted in Github Pages
问题描述
我创建了一个基于Jekyll的博客,并使用GitHub Pages进行托管。
现在,我想设置一个子域名(blog.example.com),但无法使其工作。
我添加了一个CNAME文件,文本为:blog.example.com。我已经在我的Dreamhost帐户中为A子记录添加了A记录,它们都指向由GitHub提供的204.232.175.78。
任何关于缺少部分的想法,或者如果我做错了什么?
设置与 example.com
和子域名 blog.example.com
。
如果是sub-domain:blog.example.com
- 转到域名|管理域在您的webpanel中
- 定位
blog.example.com
,单击删除等待10分钟,然后点击example.com 下面的 DNS 链接。 code>
- 添加
CNAME
记录:
/ ul> - 添加
CNAME
记录:
- 名称 =
www
- 类型 =
CNAME
- 值 =
yourusername.github.io。
(是的,有一个<$ c
$ p
$ p $ >(是的,在这种情况下,您需要A
和CNAME
记录。)
顺便说一句,我知道t的唯一原因他是因为我上周末做了同样的事情。我很失落,但有帮助的人帮助我一半,我找出了其余的。这个程序适用于我,我需要两种情况,所以我测试了这两种情况。I created a Jekyll-powered blog and am hosting it with GitHub Pages.
Now, I want to set up a subdomain (blog.example.com), but can't make it work.
I have added a CNAME file with the text: blog.example.com. And I have added to A records in my Dreamhost account for the subdomain, both pointing to 204.232.175.78, provided by GitHub.
Any idea about what the missing part is, or if I'm doing something incorrectly?
解决方案The setup is different for domains like
example.com
and sub-domains likeblog.example.com
.In case of a sub-domain: blog.example.com
- Go to Domains | Manage Domains in your webpanel
- Locate
blog.example.com
, click Delete in the Actions column - Wait 10 minutes, and then click the DNS link below
example.com
- Add a
CNAME
record:- Name =
blog
- Type =
CNAME
- Value =
yourusername.github.io.
(yes there is a.
at the end!)
- Name =
In case of a domain: example.com
- Go to Domains | Manage Domains in your webpanel
- Locate
example.com
, click Edit in the Actions column and switch to DNS only hosting (it's at the bottom) - Go back to Domains | Manage Domains in your webpanel
- Click the DNS link below
example.com
- Add an
A
record:- Name = (blank, nothing)
- Type =
A
- Value =
192.30.252.153
(GitHub, from this page)
- Add a
CNAME
record:- Name =
www
- Type =
CNAME
- Value =
yourusername.github.io.
(yes there is a.
at the end!)
- Name =
(Yes, you need both the
A
andCNAME
records in this case.)Btw, the only reason I know this is because I did the same thing last weekend. I was quite lost, but the helpful support guys helped me half way, and I figured out the rest. This procedure works for me, I needed both cases so I tested both.
这篇关于为Github Pages中托管的Jekyll Blog设置自定义子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 名称 =