Right now your site lives at a long username.github.io address. A custom domain — like ai-for-teachers.org — is short, professional, and truly yours. This lesson shows you how to buy one and point it at your GitHub site.
現在你的網站住在一長串的 username.github.io 網址。一個自訂網域——像 ai-for-teachers.org——又短、又專業、而且真正屬於你。這一課教你怎麼買一個,並把它指向你的 GitHub 網站。
A domain is your web address. You don't buy it once — you rent it yearly, usually about US$10–12 a year for a .com or .org.網域就是你的網址。它不是一次買斷——你是按年租用,.com 或 .org 通常一年約 US$10–12。
.com, .org, .net, .tw) is the TLD. .org reads as education / nonprofit; .com is the most familiar.結尾(.com、.org、.net、.tw)叫 TLD。.org 有教育/公益感;.com 最常見。A registrar is the company you buy from. They're not all equal — here are the popular ones:Registrar(網域註冊商)就是你買網域的公司。各家差很多——以下是常見的幾家:
| Registrar註冊商 | Why people like it優點 | Watch out for要注意 |
|---|---|---|
| Cloudflare | At-cost pricing (cheapest), free privacy, excellent DNS成本價(最便宜)、免費隱私保護、DNS 很強 | Fewer TLDs; must use Cloudflare's DNS; plainer interfaceTLD 較少;必須用 Cloudflare 的 DNS;介面樸素 |
| Namecheap | Affordable, friendly, lots of TLDs, free privacy便宜、好上手、TLD 多、免費隱私 | A few upsells at checkout結帳時會推銷一些加購 |
| Porkbun | Low prices, lovely interface, many TLDs, free privacy價格低、介面好用、TLD 多、免費隱私 | Smaller name (but solid and trusted)名氣較小(但穩定可靠) |
| Squarespace | Simple; took over Google Domains簡單;接手了 Google Domains | Mid-priced; tied to the Squarespace ecosystem價格中等;綁在 Squarespace 生態 |
| GoDaddy | Huge, cheap first year, ads everywhere規模大、第一年便宜、到處打廣告 | Pushy upsells; renewals get pricey — read the renewal price推銷很兇;續約變貴——務必看清續約價 |
ai-for-teachers.org).挑一個短又好唸的。短的被搶走了,就試把字拼出來的版本(例如 ai-for-teachers.org)。
DNS is the internet's address book — it tells the world where your domain should go. To point it at your GitHub Pages site, add a few records in your registrar's DNS settings.DNS 是網際網路的「通訊錄」——它告訴全世界你的網域該連到哪。要把它指向 GitHub Pages,就在註冊商的 DNS 設定裡加幾筆記錄。
yourname.org) to GitHub's servers.A 記錄把你的根網域(yourname.org)送到 GitHub 的伺服器。www to your github.io address.CNAME 把 www 送到你的 github.io 網址。@ (the root)為 @(根網域)加 4 筆 A 記錄
Point them at GitHub's four addresses:指向 GitHub 的四個位址:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
www為 www 加一筆 CNAME
Name www → value your-username.github.io名稱 www → 值 your-username.github.io
https://yourdomain.org.等憑證好了再勾。你的網站現在就在 https://yourdomain.org 了。
www with a CNAME根網域用 4 筆 A 記錄 → GitHub;www 用 CNAME