Set up custom subdomain for Jekyll Blog hosted in Github Pages

瘦欲@ 提交于 2019-12-02 14:15:31
janos

The setup is different for domains like example.com and sub-domains like blog.example.com.

In case of a sub-domain: blog.example.com

  1. Go to Domains | Manage Domains in your webpanel
  2. Locate blog.example.com, click Delete in the Actions column
  3. Wait 10 minutes, and then click the DNS link below example.com
  4. Add a CNAME record:
    • Name = blog
    • Type = CNAME
    • Value = yourusername.github.io. (yes there is a . at the end!)

In case of a domain: example.com

  1. Go to Domains | Manage Domains in your webpanel
  2. Locate example.com, click Edit in the Actions column and switch to DNS only hosting (it's at the bottom)
  3. Go back to Domains | Manage Domains in your webpanel
  4. Click the DNS link below example.com
  5. Add an A record:
    • Name = (blank, nothing)
    • Type = A
    • Value = 185.199.108.153 (GitHub, from this page)
  6. Add a CNAME record:
    • Name = www
    • Type = CNAME
    • Value = yourusername.github.io. (yes there is a . at the end!)

(Yes, you need both the A and CNAME 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.

Because of the way DNS records are cached across the internet, these sorts of changes can take a few hours to take effect. It looks like the address you provided resolves correctly now.

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