Vercel 域名绑定

Vercel 域名绑定

Tags
Published
April 22, 2024
Author

购买域名


域名提供商有很多,首推 Namesilo 和 Cloudflare,价格实惠。其中,在 Cloudflare 上购买后,可以直接使用 Cloudflare 的免费服务,不需要再额外修改 DNS Server 。

绑定域名

打开自己的 Vercel Project,添加 Domain。Vercel 会显示需要添加的 ip 地址和 name 。
notion image

绑定 DNS


Namesilo

打开 Domain Manager,点击 🌎 图标,进入 Manage DNS。
notion image
域名初次购买后,Manage DNS 中会有默认的几条 DNS 记录,删掉即可。然后添加 Vercel 中显示的需要添加的 DNS Record。最后,等待 30 分钟左右即可生效。
notion image

Cloudflare

⬅️ 点击利用 Cloudflare 进行 DNS 配置的优势
  • 免费
  • 安全可靠(可防止站点被恶意攻击)
  • 高速
    • notion image
  • 访问数据可视化
    • notion image

配置 NameServer

要将 DNS Record 配置在 CF 上,必须将 DNS Server 配置为 Cloudflare 提供的服务器。
notion image
notion image
进入 NameServer Manager,将 Namesilo 原有的 NS 删掉,换成 CF 提供的 NS。
notion image
进入 CF 中的 DNS Records 管理界面,将 Vercel 中的 DNS Record 添加进去,大功告成。
notion image
 

问题


  1. Cloudflare 添加好 DNS Record 后,提示 This hostname is not covered by a certificate(该主机未被证书覆盖)
    1. 关闭该 DNS Record 的 Proxy 功能
    2. 开启通用 SSL
      1. notion image
      • 打开该 DNS Record 的 Proxy 功能
  1. 打开配置到 DNS Record 的 域名时,提示重定向次数过多怎么处理?
    1. notion image