Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义域名以及解析 #326

Closed
xugaoyi opened this issue Mar 6, 2020 · 1 comment
Closed

自定义域名以及解析 #326

xugaoyi opened this issue Mar 6, 2020 · 1 comment

Comments

@xugaoyi
Copy link
Owner

xugaoyi commented Mar 6, 2020

1、申请域名

申请域名当然去哪都行。 国内的阿里云腾讯云,国外的freenom,namecheap什么的 。 操作大同小异,都是

  • 注册账号,登录

  • 搜索并找到可用的域名,买下来。比如我在腾讯云买的一个域名:xugaoyi.com

2、DNS解析

想要在浏览器里面输入xugaoyi.com就能跳到博客页面。我们首先需要做的就是通过DNS解析将xugaoyi.com 与某已有域名绑定起来(CNAME),或者是固定的ip地址绑定起来(A)。

这里以腾讯云操作为例,步骤如下:

  • 域名列表中点击解析

解析

  • 进入解析页面后,点击添加记录。填入,记录类型:CNAME,主机记录:www@,解析线路:默认,记录值:你的github pages地址<userName>.github.io,TTL:默认的10分钟,确定。

解析2

3、使github pages与域名关联

deploy.sh添加如下脚本

echo 'xugaoyi.com' > CNAME # // 域名替换成你的
@VergilGao
Copy link

coding要买cdn否则不让绑自定义域名……

@xugaoyi xugaoyi closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants