Is it possible to set up SSL with a custom domain on github pages

When setting up a GitHub pages, I tried to enable SSL, but because I have a custom domain, it doesn’t let me do this. Is there a way we can set this up?

5 Likes

Yes, sure you can.

I wanted to do this a while back and did some research on it. It appears you can use CloudFlare to do this, by setting a page rule that forces HTTPS redirects amongst other things.

There are quite a lot of tutorials out there, but this tutorial on CloudFlare’s blog as well as this GitHub Gist really broke it down.

Do let me know if it works well when you try it.

Cheers!

4 Likes

Great, thanks. I’ll give that a try, that makes sense.

2 Likes

You can do it with fly.io too.

1 Like

Cool, I haven’t heard of them before, I will check them out.

Tried fly.io, but it looks like they don’t support letsencrypt directly.