OSDL
Open Source DevLab collaborate · build · ship
How to Set Up a Custom Domain for Jekyll on GitHub Pages (DNS, CNAME, HTTPS, and Troubleshooting)
Rating: 4.8 / 5

How to Set Up a Custom Domain for Jekyll on GitHub Pages (DNS, CNAME, HTTPS, and Troubleshooting)

Getting your Jekyll site onto a real domain

You got a Jekyll site on GitHub Pages and it works, but the URL looks like a homework project. So yeah, custom domain time. This is where it gets a bit real because you are not just pushing code anymore, you are poking DNS and waiting for the internet to catch up.

The basic idea is simple. You buy a domain, then you point it at GitHub Pages. That means adding DNS records, usually A records for the root domain and a CNAME for the www version. Then inside GitHub Pages settings you tell it what domain you want, and GitHub drops a CNAME file into your repo behind the scenes or you add it yourself if needed.

HTTPS is the part people forget until the browser yells at them. GitHub can give you a free certificate, but only after DNS is correct and has had time to settle. Sometimes it takes minutes, sometimes longer, and that waiting feels annoying because nothing looks broken yet nothing is finished either.

And yeah there are gotchas. Like mixing up apex vs www, using the wrong IPs, having an old CNAME somewhere else still hanging around, or turning on “Enforce HTTPS” too early then wondering why pages half load. Also caching makes it extra confusing because one device works and another one acts like its stuck in yesterday.

Quick wrap up

Once DNS points right, the custom domain sticks, HTTPS flips on, and your Jekyll site finally looks like an actual website people would trust clicking.

COMMENTS

No comments yet. (This block is reserved for future threaded discussions.)