domains

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Domains

域名

Use the public Registrar API for unauthenticated discovery. Use the installed Vercel CLI for account and project operations, or the REST API for structured automation.
vc
and
vercel
are equivalent.
Registration, Vercel team ownership, project assignment, and authoritative DNS are separate. Connecting an already-owned domain does not require buying it or transferring its registration.
对于无需身份验证的发现操作,使用公共 Registrar API。对于账户和 project 操作,使用已安装的 Vercel CLI;也可以使用 REST API 进行结构化自动化。
vc
和
vercel
等效。
注册、Vercel team 所有权、project 分配和权威 DNS 彼此独立。连接一个已经拥有的域名,不需要购买它或转移其注册。

Search before asking for credentials

在索要凭据前先搜索

Start exact-name research with one request returning availability and pricing together:
bash
curl --fail-with-body --silent --show-error \
  https://api.vercel.com/v1/registrar/domains/search \
  --header 'Content-Type: application/json' \
  --data '{"domains":["example.com","example.dev","example.app"]}'
Send 1–200 exact domain names per request. The endpoint checks the supplied names; it does not generate suggestions. Generate candidates from the user's naming constraints, then batch them. No Vercel account, token, or project link is needed.
Results preserve input order. Available entries include
domain
,
available
,
years
,
price
,
renewalPrice
, and
premium
; prices are USD for the returned term. Report registration and renewal costs with that term, and flag premium domains.
available: false
means unavailable or availability could not be confirmed; it does not prove someone owns the name. Missing prices are unknown, not zero. Availability and quotes can change before purchase.
For keyword/TLD discovery, a recent CLI can generate candidates:
bash
vercel domains search acme --tld com --tld dev --available --format=json
vercel domains check example.com example.dev --format=json
vercel domains price example.com --format=json
Check
vercel domains --help
and the selected subcommand's
--help
against the installed version. If discovery is unavailable or the CLI asks for login, use the public endpoint directly. CLI
search
accepts a keyword; API
search
accepts exact names. Do not substitute one input shape for the other.
先通过一次请求对精确域名进行查询,同时获取可用性和价格:
bash
curl --fail-with-body --silent --show-error \
  https://api.vercel.com/v1/registrar/domains/search \
  --header 'Content-Type: application/json' \
  --data '{"domains":["example.com","example.dev","example.app"]}'
每个请求可发送 1–200 个精确域名。该端点会检查提供的名称;它不会生成建议。根据用户的命名约束生成候选域名,然后批量查询。不需要 Vercel 账户、token 或 project link。
结果会保留输入顺序。返回的条目包含
domain
、
available
、
years
、
price
、
renewalPrice
和
premium
;价格以 USD 表示,并对应所返回的期限。报告注册和续订成本时应附上该期限,并标记 premium 域名。
available: false
表示域名不可用或无法确认可用性;它不能证明有人拥有该名称。缺失的价格属于未知,而不是零。可用性和报价在购买前可能发生变化。
对于关键词/TLD 发现,较新版本的 CLI 可以生成候选项:
bash
vercel domains search acme --tld com --tld dev --available --format=json
vercel domains check example.com example.dev --format=json
vercel domains price example.com --format=json
根据已安装的版本,检查
vercel domains --help
和所选子命令的
--help
。如果发现功能不可用,或 CLI 要求登录,请直接使用公共端点。CLI 的
search
接受关键词;API 的
search
接受精确名称。不要用一种输入形式替代另一种。

Connect and diagnose an existing domain

连接和诊断现有域名

For authenticated work, inspect
vercel whoami
and use
--scope <team>
when selecting a team. Resolve the intended project before changing its domains.
bash
vercel domains ls --scope my-team
vercel domains inspect example.com --scope my-team
vercel domains add example.com my-project --scope my-team
vercel domains verify example.com --project my-project --format=json --scope my-team
Use the actual expected DNS records and ownership-verification values returned for that domain and project. Do not hardcode a universal A record or CNAME target. Configure records at the authoritative DNS provider;
vercel dns
changes Vercel DNS only. Preserve unrelated records, especially MX and email-verification TXT records. Nameserver changes require carrying over the zone's required records.
TaskCLI
List DNS records
vercel dns ls example.com
Inspect a record
vercel dns inspect <record-id> --format=json
Add the required TXT record
vercel dns add example.com <record-name> TXT <record-value>
Update an existing record
vercel dns update <record-id> --value <record-value>
Remove a specific record
vercel dns rm <record-id>
Move team ownership
vercel domains move example.com <destination-team>
Remove team ownership
vercel domains rm example.com
After a change, rerun
domains verify
and check DNS propagation and HTTPS. Verification can exit nonzero while returning useful JSON describing the mismatch. An accepted DNS write is not proof that DNS has propagated or a certificate is ready.
domains add --force
can detach the domain from another project; use it only when that reassignment is intended. Removing team ownership is not a registrar transfer or cancellation of registration.
对于需要身份验证的操作,检查
vercel whoami
,并在选择 team 时使用
--scope <team>
。在更改其域名前,先确定目标 project。
bash
vercel domains ls --scope my-team
vercel domains inspect example.com --scope my-team
vercel domains add example.com my-project --scope my-team
vercel domains verify example.com --project my-project --format=json --scope my-team
使用该域名和 project 实际返回的预期 DNS 记录及所有权验证值。不要硬编码通用 A 记录或 CNAME 目标。在权威 DNS 服务商处配置这些记录;
vercel dns
只会更改 Vercel DNS。保留不相关的记录,尤其是 MX 和 email-verification TXT 记录。更改 nameserver 时,必须迁移该 zone 所需的记录。
任务CLI
列出 DNS 记录
vercel dns ls example.com
查看记录
vercel dns inspect <record-id> --format=json
添加所需的 TXT 记录
vercel dns add example.com <record-name> TXT <record-value>
更新现有记录
vercel dns update <record-id> --value <record-value>
移除特定记录
vercel dns rm <record-id>
迁移 team 所有权
vercel domains move example.com <destination-team>
移除 team 所有权
vercel domains rm example.com
完成变更后,重新运行
domains verify
,并检查 DNS 传播和 HTTPS。验证命令可能在返回描述不匹配情况的有用 JSON 时以非零状态退出。DNS 写入被接受,并不证明 DNS 已完成传播或证书已就绪。
domains add --force
可以将域名从另一个 project 分离;仅在确实需要这种重新分配时使用。移除 team 所有权既不是 Registrar 转移,也不是取消注册。

Purchase, transfer, and renew

购买、转移和续订

Use existing authorization for the exact domain, term, price, and renewal preference. If those choices are unresolved, prepare the current quote before asking. Do not treat a discovery request as permission to purchase. Use real user-provided registrant information and keep tokens, contact data, and transfer codes out of logs and committed files.
TaskCLI
Register a domain
vercel domains buy example.com
Transfer from another registrar
vercel domains transfer-in example.com
Renew registration
vercel domains renew example.com
Enable or disable automatic renewal
vercel domains auto-renew example.com on
/
off
Purchase, transfer, and renewal flows may require interactive input. JSON output does not bypass renewal's charge confirmation. For an authorized noninteractive operation, use the Registrar API with the required payload instead of inventing CLI flags. Moving between Vercel teams uses
domains move
, not
transfer-in
.
针对确切的域名、期限、价格和续订偏好,使用现有授权。如果这些选择尚未确定,应先准备当前报价,然后再询问。不要将发现请求视为购买许可。使用真实且由用户提供的注册人信息,并确保 token、联系数据和转移码不会出现在日志或已提交的文件中。
任务CLI
注册域名
vercel domains buy example.com
从其他 Registrar 转移
vercel domains transfer-in example.com
续订注册
vercel domains renew example.com
启用或禁用自动续订
vercel domains auto-renew example.com on
/
off
购买、转移和续订流程可能需要交互式输入。JSON 输出不会绕过续订时的费用确认。对于已获授权的非交互式操作,请使用 Registrar API 及所需 payload,而不是臆造 CLI 参数。在 Vercel team 之间移动域名应使用
domains move
,而不是
transfer-in
。

Registrar API

Registrar API

Base URL:
https://api.vercel.com
. Consult the live OpenAPI schema for the selected operation's request and response fields before constructing a mutation.
基础 URL:
https://api.vercel.com
。在构建 mutation 之前,请查阅实时 OpenAPI schema,了解所选操作的请求和响应字段。

Public discovery

公共发现

Use the Registrar API reference for public TLD metadata, term-specific domain prices, availability, and contact requirements. These operations require no authentication. Bulk availability and price calls accept 1–50 domains; search accepts 1–200.
TLD base prices do not quote premium domains. Use domain-specific prices for the requested term; price endpoints return
purchasePrice
, unlike search's
price
. Some price fields can be strings rather than numeric quotes; do not submit those as
expectedPrice
.
使用 Registrar API reference 获取公共 TLD 元数据、按期限区分的域名价格、可用性和联系人要求。这些操作无需身份验证。批量可用性和价格查询可接受 1–50 个域名;
search
可接受 1–200 个域名。
TLD 基础价格不提供 premium 域名报价。对于请求的期限,使用域名专属价格;price 端点返回
purchasePrice
,而
search
返回
price
。某些 price 字段可能是字符串而不是数值报价;不要将这些字段作为
expectedPrice
提交。

Authenticated operations

已认证操作

Send
Authorization: Bearer <token>
and use
?teamId=<team-id>
for the intended team. Use
Content-Type: application/json
for JSON bodies. Reuse a securely available token; do not ask for one for public discovery.
Use the selected operation in the live schema for purchases, transfers, renewals, automatic renewal, nameservers, and contact verification. Inspect asynchronous results with
GET /v1/registrar/orders/{orderId}
. An empty nameservers array selects Vercel defaults; contact verification is unavailable for the first 30 minutes after purchase.
For purchases, retrieve the contact schema and supply required TLD-specific values through the purchase payload's
contactInformation.additional
field. For transfers, use only contact fields accepted by that operation's live schema; it does not accept the purchase-only
additional
field. Punycode purchases require a supported
languageCode
; inspect the TLD metadata. Quote the exact operation and term, then use that numeric quote as
expectedPrice
. Reassess a price mismatch against the user's authorized spend instead of silently accepting an increase.
Purchases, renewals, and transfers can complete asynchronously. Save the returned order ID, inspect the order and each domain's status, and report pending or failed outcomes accurately. If a submission times out, reconcile its order status before resubmitting a charge. Stop polling when completed or failed; if still pending after a bounded check, return the order ID and next status-check action. Complete any required registrant email verification.
Use
/v1/registrar/*
for registrar operations instead of sunset legacy purchase, price, availability, or transfer endpoints. Existing project-domain and DNS APIs serve separate purposes; the registrar API does not replace them.
发送
Authorization: Bearer <token>
,并使用
?teamId=<team-id>
指定目标 team。对于 JSON body,使用
Content-Type: application/json
。复用可安全获取的 token;不要为公共发现操作索要 token。
在实时 schema 中选择相应操作,以执行购买、转移、续订、自动续订、nameservers 和联系人验证。使用
GET /v1/registrar/orders/{orderId}
检查异步结果。空的 nameservers 数组表示选择 Vercel 默认值;购买后前 30 分钟内无法进行联系人验证。
对于购买操作,获取联系人 schema,并通过购买 payload 的
contactInformation.additional
字段提供所需的 TLD 专属值。对于转移操作,仅使用其实时 schema 接受的联系人字段;该操作不接受仅用于购买的
additional
字段。Punycode 购买需要受支持的
languageCode
;请检查 TLD 元数据。获取确切操作和期限的报价,然后将该数值报价用作
expectedPrice
。价格不匹配时,应根据用户授权的支出额度重新确认,不要默默接受涨价。
购买、续订和转移可能异步完成。保存返回的 order ID,检查 order 和每个域名的状态,并准确报告 pending 或 failed 状态。如果提交请求超时,请在重新提交扣费前核对 order 状态。order 完成或失败后停止轮询;如果在限定次数的检查后仍处于 pending 状态,则返回 order ID 和下一步状态检查操作。完成所有必需的注册人邮箱验证。
Registrar 操作应使用
/v1/registrar/*
,而不是即将停用的旧版购买、价格、可用性或转移端点。现有的 project-domain API 和 DNS API 各自服务于不同用途;Registrar API 不能替代它们。