Porkbun is my new favorite domain registrar and had the best deals on .io domains that I could find, but I wanted to use DNSimple to manage my DNS settings.
DNSimple offers a robust API and a Terraform provider, which is very appealing to my infrastructure-as-code aspirations.
Luckily, it’s pretty easy to get the best of both worlds:
Through Porkbun, replace the domain’s default nameservers with DNSimple’s nameservers.
Import the domain through DNSimple and bam! now you can use their rad API to manage the domain, which you purchased somewhere else.
(Full disclosure: use of DNSimple’s services does require a subscription fee.)
Now, this is just a static site generated through Hugo and made pretty by the Ananke theme.
It’s deployed to a
docs/ directory on the project repository’s
master branch, and uses the custom domain
tlake.io instead of GitHub’s default
It took a bit of doing to make GitHub happy, and this is the point of this post.
GitHub’s got good documentation around using a custom domain with GitHub Pages.
In my case, I was looking to set up an apex domain (
tlake.io, instead of something like
www.tlake.io) as noted here.
DNSimple does indeed allow me to configure
ALIAS records, so I did.
I built and deployed the site, updated the custom domain to
tlake.io in the repo’s settings, and gave the record some time to propagate.
tlake.io displayed the homepage!
It was working!
Then I looked in the repo’s settings again.
But… but the site was working.
I could navigate to it.
Other people could navigate to it.
What was GitHub’s problem with it?
I did some **
dig**ging (FUNNY JOKE) to see if
tlake.github.io were resolving in the same way.
for d in tlake.io tlake.github.io ; do dig $d +noall +answer ; done
; <<>> DiG 9.8.3-P1 <<>> tlake.io +noall +answer
;; global options: +cmd
tlake.io. 2829 IN A 220.127.116.11
tlake.io. 2829 IN A 18.104.22.168
tlake.io. 2829 IN A 22.214.171.124
tlake.io. 2829 IN A 126.96.36.199
; <<>> DiG 9.8.3-P1 <<>> tlake.github.io +noall +answer
;; global options: +cmd
tlake.github.io. 2976 IN A 188.8.131.52
tlake.github.io. 2976 IN A 184.108.40.206
tlake.github.io. 2976 IN A 220.127.116.11
tlake.github.io. 2976 IN A 18.104.22.168
So what gives?
Well, after a couple hours of experimenting with DNS settings, I discovered a configuration that seemed to satisfy GitHub: adding a
CNAME record that pointed
This combined with the previous
ALIAS record convinced GitHub to stop complaining.
And that’s about it!
It’s not particularly difficult, but it’s a tiny thing that was overlooked in the documentation, and my Google Fu didn’t turn up the answer, so here we are.