Publishing a Website — GitHub Pages on a Custom Domain
00要約Overview
01物語Story
Situation
2.4.1 secured the custom domain. Next, an actual website has to live there, in public.
Complication
Hosting options are many. Go dynamic and the possibilities expand — along with server upkeep and costs. In the early days of a solo project, that's baggage I'd rather not carry.
Question
How do you put a website on a custom domain, cheaply?
02解決Solution
Criteria
- Publishable free, or close to it
- Connects to the custom domain easily
- Can move to different hosting later
Answer
A static site on GitHub Pages, connected to the custom domain. Set an A record (for the root domain) and a CNAME in DNS, and the site shows up under your own address. The setup is over quickly.
Reason
Because static sites are fast, safe — and cheap. With no server-side processing, pages render fast and the attack surface stays small, and GitHub Pages hosts it all for free. And the property that matters most is movability: even if the project outgrows GitHub Pages, repointing the DNS relocates everything.
Own the address yourself,
and you can always move house, lightly.
So: start on static routing, and let "should this be dynamic?" be a later question.
Options
- Dynamic hosting (Vercel and friends) — more capability, but oversized at the start. Move when the need is real; with your own domain, migration is a pointer change. So, for now: static.
03結果Result
Good
A free static site, live on the custom domain. It renders fast, and upkeep is nearly nothing. The brand's public face went up without spending anything.
Bad
Static means no server-side behavior. The day forms or login are needed, either bolt on a separate service for that piece, or make the call to move to dynamic hosting.
Follow-up
With the site live, the same domain has one more gift to give: a custom email address. Continued in 2.4.3 Custom email.