May 23rd, 2020
Github Pages is a beatiful thing for static website hosting. If you have a github account with username myname
and create a repo called myname.github.io
, you officially have a static website that you can access by just going to https://myname.github.io
! I used it for about 2-3 years now. A man has to grow up and finally have his own domain. This is a quick post about how to make it happen.
Let’s say you bought your domain myname.com
. First thing to do, go to your domain dashboard and set the following in your domain’s custom records,
Name | Type | TTL | Data |
---|---|---|---|
@ |
A |
1h |
185.199.108.153 |
185.199.109.153 | |||
185.199.110.153 | |||
185.199.111.153 | |||
www |
CNAME |
1h |
myname.github.io. |
After that, go to your myname.github.io
repo’s settings and in the section Github Pages, fill in your custom domain and tick the Enforce HTTPS option. Now, just wait. You might get bad redirects, bad certificates, etc. Give it couple of minutes up to an hour to start working properly.
Voila, you’re done! ◼︎