I had a particular case for this tech garden while setting up SSL:
- My domain was not an apex domain. This means: it was a subdomain. Instead of
alphasmanifest.com
, I wanted to usetechgarden.alphasmanifesto.com
- My github repository is not a direct association to my user. This means: instead of
AlphaGit/alphagit.github.io
, my repository wasAlphaGit/tech-garden
.
With all of this, I struggled a bit to make HTTPS work but here’s how to set itup:
- In your DNS provider, setup your subdomain to have a
CNAME
record matching your base GitHub publishing domain. This would be<yourUser>.github.io
or<yourOrganization>.github.io
. It doesn’t matter if you’re using another repo, don’t add anything else to it. - Make sure that the changes are propagated.
- In GitHub pages, publish your site.
- Associate a custom domain to it, using the subdomain you setup. In my case:
techgarden.alphasmanifesto.com
- Click on Save. This will create a
CNAME
file in your repo, in the publishing folder you selected. It will also validate the configuration of your DNS records. - If allowed, click on Enforce HTTPS. It might fail, but wait at least one hour. It does work even if it reports an error at first.
You’re looking at that result right now.