Give your github a personal domain
Introduction
If you put your personal website into github page, you may suffer some problems. Such as the speeds of accessing website, modify difficulty and the original github domain is so long. I think make you most painful is the access speeds(Due to the github servers are setted in abroad, the speeds have been limited). OK, let’s increase its speeds together.
Prerequisite
- This tutorial is base on you have got a github website like that http://jasonsorria.github.io and a international domain.
- In this test, i will use my github website to teach you how to add a new domain.
Quick start
-
Clone your repositories to local:
git clone https://github.com/JasonSorria/JasonSorria.github.io && cd JasonSorria.github.io/
-
Add a
CNAME
file and input your domain in it:echo "blog.coolshark.xyz" >> CNAME
. Warning: not addwww
orhttp
. -
Update your repositories:
git add CNAME && git commit -a "cname" && git push
-
Add record for your domain like that:(I recommend cloudflare because it offers CDN and DNSSEC service)
-
Why your github website will access faster and more beautiful? Because the github servers are setted in abroad, the CDN will get more effect than use the way of forwarding access your website from domestic. If you do not know how to obtain CDN for your domain, you can see this article.