免费域名别乱薅:一根线串起全网 | Free Domains Without the Free-Drama
一个免费域名不只是网址:HapDNS负责短前缀和DDNS,Cloudflare负责DNS与网络加速,EU.org负责慢慢申请的长期选择,DigitalPlat补上另一条免费路线。唯一的“小脾气”是免费域名各有规则,但钱包终于可以先喘口气。
A free domain is more than an address: HapDNS brings short names and DDNS, Cloudflare handles DNS and edge services, EU.org offers a slower long-term route, and DigitalPlat adds another free option. The rules can be quirky, but at least your wallet gets a coffee break.
实操案例
例子:做一个免费的个人技术状态站,用 HapDNS 免费短域名作为入口、Cloudflare 管理 DNS 与 HTTPS、Mac 上生成内容,再用免费的静态托管发布。/Example: build a free personal tech-status site using a HapDNS short domain, Cloudflare for DNS and HTTPS, and free static hosting for the actual site.
为什么选这个例子
这个例子可以把三个参考方向真正串成一条线:
免费域名 → DNS → Cloudflare → HTTPS → 网站
同时还能演示:
短前缀、NS 委派、DNS 记录、CDN/Proxy、SSL、静态网站部署。
而且不需要 VPS、不需要 AWS、不需要付费域名,非常适合 MacBook M2 16GB。
准备 Mac 环境/Prepare the Mac environment
Mac 只需要浏览器、Terminal 和一个 GitHub 账号即可开始。/A Mac only needs a browser, Terminal, and a GitHub account to start.
创建网站项目/Create the website project
在 Mac 上创建一个简单的个人技术状态页面,页面显示网站名称、项目介绍和当前运行状态。/Create a simple personal tech-status page on the Mac showing the site name, project description, and current status.
使用纯静态网页/Use a static website
网站只使用 HTML、CSS 和少量 JavaScript,不使用数据库、不运行后台程序,让免费托管保持简单。/Use only HTML, CSS, and a little JavaScript with no database or backend so free hosting stays simple.
创建 GitHub 仓库/Create the GitHub repository
在 GitHub 创建公开仓库并上传网站文件,让代码和网站内容都有一个稳定的版本管理位置。/Create a public GitHub repository and upload the website files so the project has proper version control.
开启 GitHub Pages/Enable GitHub Pages
在仓库设置中启用 GitHub Pages,让静态网站先使用 GitHub 提供的免费地址上线。/Enable GitHub Pages in the repository settings and publish the static site using GitHub’s free address.
测试原始网站/Test the original site
先打开 GitHub Pages 地址确认网页正常,再继续配置自己的免费域名。/Open the GitHub Pages address and confirm the website works before adding the free domain.
注册 HapDNS/Register with HapDNS
进入 HapDNS 官方网站创建账号,并选择当前开放的免费后缀。/Open the official HapDNS website, create an account, and choose one of its currently available free suffixes.
选择普通短前缀/Choose a normal short prefix
优先选择当前普通用户可以注册的短前缀,不把需要特殊额度的 1–2 位稀缺前缀当作必然结果。/Choose a short prefix currently available to normal users and do not assume that restricted one- or two-character names are available.
注册免费域名/Register the free domain
注册一个类似个人项目名称的二级域名,并记录 HapDNS 后台显示的实际到期时间。/Register a project-friendly second-level domain and record the actual expiration date shown in the HapDNS dashboard.
记录续期规则/Record the renewal rule
不要根据旧文章判断有效期,直接以 HapDNS 当前账户后台显示的期限和续期按钮为准。/Do not rely on old articles for the expiration period; use the current HapDNS dashboard and its renewal controls.
检查 HapDNS DNS/Check HapDNS DNS
进入域名 DNS 管理页面,确认自己可以添加 A、CNAME、TXT 等记录。/Open the HapDNS DNS management page and confirm that you can add records such as A, CNAME, and TXT.
准备 Cloudflare/Prepare Cloudflare
创建免费的 Cloudflare 账号,不购买 Pro、Business 或其他付费套餐。/Create a free Cloudflare account without purchasing Pro, Business, or any paid plan.
添加域名到 Cloudflare/Add the domain to Cloudflare
在 Cloudflare 中添加刚刚注册并且已经可用的 HapDNS 域名,选择免费的 DNS setup。/Add the newly registered HapDNS domain to Cloudflare and use the free DNS setup.
获取 Cloudflare Nameservers/Get the Cloudflare nameservers
Cloudflare 会为该域名分配自己的 authoritative nameservers,把这些服务器地址记录下来。/Cloudflare will assign authoritative nameservers for the domain, so copy them carefully.
委派 HapDNS NS/Delegate the HapDNS nameservers
回到 HapDNS 的 DNS 服务器设置,把 Cloudflare 分配的 nameservers 填进去并保存。/Return to HapDNS DNS server settings, enter the Cloudflare nameservers, and save the change.
等待 DNS 委派生效/Wait for DNS delegation
等待 DNS 传播完成,再回到 Cloudflare 检查域名是否从 Pending 变成 Active。/Wait for DNS delegation to propagate, then return to Cloudflare and check whether the domain changes from Pending to Active.
检查 DNS 记录/Verify the DNS records
确认 Cloudflare 中的网站记录指向 GitHub Pages,而不是误把记录留在 HapDNS 原来的 DNS 区域。/Confirm that the website records are managed by Cloudflare and point to GitHub Pages instead of remaining in the old HapDNS DNS zone.
添加自定义域名/Add the custom domain
在 GitHub Pages 设置中把 HapDNS 域名填写为 Custom domain。/Enter the HapDNS domain as the Custom domain in GitHub Pages settings.
创建 CNAME/Create the CNAME record
在 Cloudflare DNS 中按照 GitHub Pages 当前页面要求创建 CNAME 记录,并使用 GitHub 官方显示的目标地址。/Create the CNAME record in Cloudflare using the target address currently shown by GitHub Pages.
配置根域名/Configure the apex domain
按照 GitHub Pages 当前官方文档配置根域名所需的 DNS 记录,不照抄过时博客里的旧 IP。/Configure the apex-domain DNS records according to the current GitHub Pages documentation instead of copying outdated IP addresses from old blogs.
开启 HTTPS/Enable HTTPS
等待 GitHub Pages 验证域名后启用 HTTPS,让网站通过安全连接访问。/After GitHub Pages verifies the domain, enable HTTPS so the site is served securely.
检查 Cloudflare Proxy/Check Cloudflare Proxy
先确认 GitHub Pages 的自定义域名正常,再决定 DNS 记录是否需要 Cloudflare Proxy,避免一次改太多导致排错困难。/First confirm the GitHub Pages custom domain works, then decide whether Cloudflare Proxy is appropriate instead of changing everything at once.
测试 DNS/Test DNS
在 Mac Terminal 使用 dig 检查域名解析结果,确认 DNS 已经指向预期目标。/Use dig in the Mac Terminal to check the DNS result and confirm that it points to the expected target.
测试 HTTPS/Test HTTPS
用 Safari 和 Chrome 分别打开域名,确认 HTTPS 正常、网页正常、没有证书警告。/Open the domain in Safari and Chrome and confirm HTTPS works without certificate warnings.
测试手机访问/Test mobile access
关闭 Mac 的本地开发服务,用手机移动网络打开域名,确认网站真正从公网可访问。/Turn off the local development server and open the domain over mobile data to confirm that it is publicly reachable.
演示 DNS 记录/Add a demonstration record
在 Cloudflare 中增加一个 TXT 记录,用它演示网站验证、服务配置和 DNS 管理的基本方法。/Add a TXT record in Cloudflare to demonstrate the basics of verification and DNS management.
演示 DynDNS/Demonstrate DynDNS
如果家里存在真实动态公网 IP,可以把另一个 HapDNS 域名用于 DynDNS;没有公网可达地址时不要假装它能完成内网穿透。/If you have a real dynamic public IP at home, use another HapDNS domain for DynDNS; do not pretend DDNS provides NAT traversal when your ISP uses CGNAT.
演示 EU.org/Demonstrate EU.org
同时提交一个 EU.org 域名申请,把它作为长期备用域名案例,而不是要求它当天完成。/Submit an EU.org domain request as a long-term backup example instead of expecting same-day approval.
了解 EU.org 的人工审核/Understand EU.org review
申请时提前配置符合要求的 nameservers,并接受可能需要几天甚至更久人工审核的现实。/Configure valid nameservers before applying and accept that human review can take days or potentially much longer.
演示 DigitalPlat/Demonstrate DigitalPlat
如果 HapDNS 前缀不合适,可以测试 DigitalPlat 当前开放的免费 namespace,并使用外部 DNS 管理自己的项目。/If the HapDNS namespace is unsuitable, test a currently available DigitalPlat free namespace and connect your preferred external DNS.
比较三个免费入口/Compare the three free routes
HapDNS适合短前缀和DynDNS,EU.org适合愿意等待的长期项目,DigitalPlat适合希望保持DNS和托管自由的开发者。/HapDNS fits short names and DynDNS, EU.org fits patient long-term projects, and DigitalPlat fits developers who want DNS and hosting freedom.
保存域名信息/Save the domain information
把域名、NS、DNS记录、GitHub仓库和续期日期保存到密码管理器或本地安全笔记中。/Store the domain, nameservers, DNS records, GitHub repository, and renewal date in a password manager or secure local note.
设置续期提醒/Set a renewal reminder
因为免费域名并不等于永远不用管理,所以提前设置日历提醒比某天发现域名没了更省心。/Because free domains still require management, set a calendar reminder instead of discovering one day that the domain has disappeared.
得到最终网站/Get the final website
最终得到一个真正可以从公网访问的个人技术网站,而且域名、DNS、HTTPS 和静态托管全部不需要付费。/The final result is a genuinely public personal technology website with the domain, DNS, HTTPS, and static hosting all available without payment.
准备 Mac 环境/Prepare the Mac environment
Mac 只需要浏览器、Terminal 和一个 GitHub 账号即可开始。/A Mac only needs a browser, Terminal, and a GitHub account to start.
创建网站项目/Create the website project
在 Mac 上创建一个简单的个人技术状态页面,页面显示网站名称、项目介绍和当前运行状态。/Create a simple personal tech-status page on the Mac showing the site name, project description, and current status.
使用纯静态网页/Use a static website
网站只使用 HTML、CSS 和少量 JavaScript,不使用数据库、不运行后台程序,让免费托管保持简单。/Use only HTML, CSS, and a little JavaScript with no database or backend so free hosting stays simple.
创建 GitHub 仓库/Create the GitHub repository
在 GitHub 创建公开仓库并上传网站文件,让代码和网站内容都有一个稳定的版本管理位置。/Create a public GitHub repository and upload the website files so the project has proper version control.
开启 GitHub Pages/Enable GitHub Pages
在仓库设置中启用 GitHub Pages,让静态网站先使用 GitHub 提供的免费地址上线。/Enable GitHub Pages in the repository settings and publish the static site using GitHub’s free address.
测试原始网站/Test the original site
先打开 GitHub Pages 地址确认网页正常,再继续配置自己的免费域名。/Open the GitHub Pages address and confirm the website works before adding the free domain.
注册 HapDNS/Register with HapDNS
进入 HapDNS 官方网站创建账号,并选择当前开放的免费后缀。/Open the official HapDNS website, create an account, and choose one of its currently available free suffixes.
选择普通短前缀/Choose a normal short prefix
优先选择当前普通用户可以注册的短前缀,不把需要特殊额度的 1–2 位稀缺前缀当作必然结果。/Choose a short prefix currently available to normal users and do not assume that restricted one- or two-character names are available.
注册免费域名/Register the free domain
注册一个类似个人项目名称的二级域名,并记录 HapDNS 后台显示的实际到期时间。/Register a project-friendly second-level domain and record the actual expiration date shown in the HapDNS dashboard.
记录续期规则/Record the renewal rule
不要根据旧文章判断有效期,直接以 HapDNS 当前账户后台显示的期限和续期按钮为准。/Do not rely on old articles for the expiration period; use the current HapDNS dashboard and its renewal controls.
检查 HapDNS DNS/Check HapDNS DNS
进入域名 DNS 管理页面,确认自己可以添加 A、CNAME、TXT 等记录。/Open the HapDNS DNS management page and confirm that you can add records such as A, CNAME, and TXT.
准备 Cloudflare/Prepare Cloudflare
创建免费的 Cloudflare 账号,不购买 Pro、Business 或其他付费套餐。/Create a free Cloudflare account without purchasing Pro, Business, or any paid plan.
添加域名到 Cloudflare/Add the domain to Cloudflare
在 Cloudflare 中添加刚刚注册并且已经可用的 HapDNS 域名,选择免费的 DNS setup。/Add the newly registered HapDNS domain to Cloudflare and use the free DNS setup.
获取 Cloudflare Nameservers/Get the Cloudflare nameservers
Cloudflare 会为该域名分配自己的 authoritative nameservers,把这些服务器地址记录下来。/Cloudflare will assign authoritative nameservers for the domain, so copy them carefully.
委派 HapDNS NS/Delegate the HapDNS nameservers
回到 HapDNS 的 DNS 服务器设置,把 Cloudflare 分配的 nameservers 填进去并保存。/Return to HapDNS DNS server settings, enter the Cloudflare nameservers, and save the change.
等待 DNS 委派生效/Wait for DNS delegation
等待 DNS 传播完成,再回到 Cloudflare 检查域名是否从 Pending 变成 Active。/Wait for DNS delegation to propagate, then return to Cloudflare and check whether the domain changes from Pending to Active.
检查 DNS 记录/Verify the DNS records
确认 Cloudflare 中的网站记录指向 GitHub Pages,而不是误把记录留在 HapDNS 原来的 DNS 区域。/Confirm that the website records are managed by Cloudflare and point to GitHub Pages instead of remaining in the old HapDNS DNS zone.
添加自定义域名/Add the custom domain
在 GitHub Pages 设置中把 HapDNS 域名填写为 Custom domain。/Enter the HapDNS domain as the Custom domain in GitHub Pages settings.
创建 CNAME/Create the CNAME record
在 Cloudflare DNS 中按照 GitHub Pages 当前页面要求创建 CNAME 记录,并使用 GitHub 官方显示的目标地址。/Create the CNAME record in Cloudflare using the target address currently shown by GitHub Pages.
配置根域名/Configure the apex domain
按照 GitHub Pages 当前官方文档配置根域名所需的 DNS 记录,不照抄过时博客里的旧 IP。/Configure the apex-domain DNS records according to the current GitHub Pages documentation instead of copying outdated IP addresses from old blogs.
开启 HTTPS/Enable HTTPS
等待 GitHub Pages 验证域名后启用 HTTPS,让网站通过安全连接访问。/After GitHub Pages verifies the domain, enable HTTPS so the site is served securely.
检查 Cloudflare Proxy/Check Cloudflare Proxy
先确认 GitHub Pages 的自定义域名正常,再决定 DNS 记录是否需要 Cloudflare Proxy,避免一次改太多导致排错困难。/First confirm the GitHub Pages custom domain works, then decide whether Cloudflare Proxy is appropriate instead of changing everything at once.
测试 DNS/Test DNS
在 Mac Terminal 使用 dig 检查域名解析结果,确认 DNS 已经指向预期目标。/Use dig in the Mac Terminal to check the DNS result and confirm that it points to the expected target.
测试 HTTPS/Test HTTPS
用 Safari 和 Chrome 分别打开域名,确认 HTTPS 正常、网页正常、没有证书警告。/Open the domain in Safari and Chrome and confirm HTTPS works without certificate warnings.
测试手机访问/Test mobile access
关闭 Mac 的本地开发服务,用手机移动网络打开域名,确认网站真正从公网可访问。/Turn off the local development server and open the domain over mobile data to confirm that it is publicly reachable.
演示 DNS 记录/Add a demonstration record
在 Cloudflare 中增加一个 TXT 记录,用它演示网站验证、服务配置和 DNS 管理的基本方法。/Add a TXT record in Cloudflare to demonstrate the basics of verification and DNS management.
演示 DynDNS/Demonstrate DynDNS
如果家里存在真实动态公网 IP,可以把另一个 HapDNS 域名用于 DynDNS;没有公网可达地址时不要假装它能完成内网穿透。/If you have a real dynamic public IP at home, use another HapDNS domain for DynDNS; do not pretend DDNS provides NAT traversal when your ISP uses CGNAT.
演示 EU.org/Demonstrate EU.org
同时提交一个 EU.org 域名申请,把它作为长期备用域名案例,而不是要求它当天完成。/Submit an EU.org domain request as a long-term backup example instead of expecting same-day approval.
了解 EU.org 的人工审核/Understand EU.org review
申请时提前配置符合要求的 nameservers,并接受可能需要几天甚至更久人工审核的现实。/Configure valid nameservers before applying and accept that human review can take days or potentially much longer.
演示 DigitalPlat/Demonstrate DigitalPlat
如果 HapDNS 前缀不合适,可以测试 DigitalPlat 当前开放的免费 namespace,并使用外部 DNS 管理自己的项目。/If the HapDNS namespace is unsuitable, test a currently available DigitalPlat free namespace and connect your preferred external DNS.
比较三个免费入口/Compare the three free routes
HapDNS适合短前缀和DynDNS,EU.org适合愿意等待的长期项目,DigitalPlat适合希望保持DNS和托管自由的开发者。/HapDNS fits short names and DynDNS, EU.org fits patient long-term projects, and DigitalPlat fits developers who want DNS and hosting freedom.
保存域名信息/Save the domain information
把域名、NS、DNS记录、GitHub仓库和续期日期保存到密码管理器或本地安全笔记中。/Store the domain, nameservers, DNS records, GitHub repository, and renewal date in a password manager or secure local note.
设置续期提醒/Set a renewal reminder
因为免费域名并不等于永远不用管理,所以提前设置日历提醒比某天发现域名没了更省心。/Because free domains still require management, set a calendar reminder instead of discovering one day that the domain has disappeared.
得到最终网站/Get the final website
最终得到一个真正可以从公网访问的个人技术网站,而且域名、DNS、HTTPS 和静态托管全部不需要付费。/The final result is a genuinely public personal technology website with the domain, DNS, HTTPS, and static hosting all available without payment.
评论
发表评论