Using a custom domain with GitHub Pages
It took far too long to work out how to do this on the GitHub help pages...
Assumptions:
- I've only tested for personal/user domain i.e. the doc root for
http://USERNAME.github.io/
. - You've already have an
A
(APEX) record for your existing site. - You've already got a
CNAME
record that points to theA
record.
Instructions
- Enable custom domain in your repository (settings).
- Update your
A
record to point to IP addresses:192.30.252.153
and192.30.252.154
. Pro-tip: Switch your DNS management to cloudflare if you want super fast switch from your old hosting to GitHub. echo "your-domain-name" > CNAME
in the default branch repo. This will besource
if you're doing this for a Cobalt site.