修改域名注册设置

本页面介绍如何在 Cloud Domains 中修改现有网域的注册设置,包括联系人设置、隐私设置和 DNS 设置。

准备工作

在完成这些任务之前,请查看“Cloud Domains 概览”和“问题排查”页面上的以下信息:

修改联系人和隐私设置

注册域名时,您必须提交该域名的联系信息。

如需修改注册的联系人设置(例如电子邮件地址、手机号码和邮政地址)并为联系信息选择隐私设置,请完成以下步骤。

控制台

  1. 在 Google Cloud 控制台中,前往 Cloud Domains 页面。

    前往 Cloud Domains

  2. 点击您要修改的域名。您还可以点击域名旁边的 更多来查看修改菜单。

  3. 如需修改联系人详细信息(包括与网域关联的姓名、地址和电子邮件地址),请点击修改联系人详细信息

  4. 进行必要的更改。

  5. 选择或修改隐私设置。您选择的网域可用的隐私选项可能会有所不同。

  6. 点击保存

gcloud

使用 gcloud domains registrations configure contacts 命令

gcloud domains registrations configure contacts DOMAIN_NAME

DOMAIN_NAME 替换为注册网域的名称,例如 example.app

以下示例显示了更改网域 example.com 的隐私设置时的输出:

Contact data not provided using the --contact-data-from-file flag.

Do you want to enter it interactively (y/N)?  y

Which contact do you want to change?
 [1] all the contacts to the same value
 [2] registrant contact
 [3] admin contact
 [4] technical contact
 [5] cancel
Please enter your numeric choice (1):  1

Full name:  NAME
Organization (if applicable):  ORGANIZATION
Email (darcy@gmail.com):  EMAIL_ADDRESS
Enter phone number with country code, e.g. "+1.8005550123".
Phone number:  PHONE_NUMBER
Enter fax number with country code, e.g. "+1.8005550123".
Fax number (if applicable):  FAX_NUMBER
Enter two-letter country code, e.g. "US" or "PL".
Refer to the guidelines for entering address field information at https://support.google.com/business/answer/6397478.
Country / Region code:  COUNTRY_CODE
Postal / ZIP code:  ZIP_CODE
State / Administrative area (if applicable):  STATE
City / Locality:  CITY
Address Line 1:  ADDRESS_LINE_1
Address Line 2 (if applicable):  ADDRESS_LINE_2
Address Line 3 (if applicable):
Your current contact privacy is REDACTED_CONTACT_DATA.

Do you want to change it (y/N)?  y

Specify contact privacy
 [1] private-contact-data
 [2] redacted-contact-data
 [3] public-contact-data
Please enter your numeric choice (2):  1

Waiting for 'operation-1596738116518-5ac39903c0348-5391fe45-78f57284' to
complete...done.
Updated registration [example.com] Note:
The contact settings are currently pending.
In order to finalize the update you need to confirm the change.
An email with instructions has been sent to the registrant.

替换以下内容:

  • NAME:您的全名,例如 Alice Smith
  • ORGANIZATION:(可选)您的组织,例如 Doe Corp
  • EMAIL_ADDRESS:您用于验证的电子邮件地址,例如 alice@example.net
  • PHONE_NUMBER:采用国际手机号码格式的联系人的手机号码,例如 +1-800-555-0123
  • FAX_NUMBER:采用国际格式的联系人传真号码,例如 +1-800-555-0123
  • COUNTRY_CODE:地址的国家/区域代码,例如 US 表示美国
  • ZIP_CODE:地址的邮政编码,例如 94043
  • STATE:地址所在的州/省/自治区/直辖市或行政区,例如 CA
  • CITY:地址所在的城市或市行政区,例如 Mountain View
  • ADDRESS_LINE_1:注册者的第一行地址行,例如 1599 Bayview Parkway

    您最多可添加 5 个地址行,但只有前 1 行是必填项。

  • ADDRESS_LINE_2:(可选)注册者的第二个地址行,例如 APT. 123

API

使用 registrations.configureContactSettings 方法

POST https://domains.googleapis.com/v1/projects/PROJECT_ID/locations/global/registrations/DOMAIN_NAME:configureContactSettings

替换以下内容:

  • PROJECT_ID:您的项目的名称
  • DOMAIN_NAME:要更改联系人设置的网域

请求正文可以是以下某一项:

  • 如需更改注册者联系人的电子邮件地址,请执行以下操作:

    {
      "contactSettings": {
        "registrantContact": {
          "email": "new-registrant@example.com",
        },
      },
      "updateMask": "registrantContact.email",
    }
    
  • 若要将隐私设置更改为“公开”,请执行以下操作:

    {
      "contactSettings": {
        "privacy": "PUBLIC_CONTACT_DATA",
      },
      "updateMask": "privacy",
      "contactNotices": ["PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT"],
    }
    
  • 如需更改整个注册者联系信息和隐私设置,请执行以下操作:

    {
      "contactSettings": {
        "privacy": "CONTACT_PRIVACY",
        "registrantContact": {
          "postalAddress": {
            "regionCode": "REGION_CODE",
            "postalCode": "POSTAL_CODE",
            "administrativeArea": "SUBDIVISION",
            "locality": "CITY",
            "addressLines": [
              "ADDRESS"
            ],
            "recipients": [
              "CONTACT_NAME"
            ],
            "organization": "ORGANIZATION"
          },
          "email": "EMAIL_ADDRESS",
          "phoneNumber": "PHONE_NUMBER",
          "faxNumber": "FAX_NUMBER"
        }
      },
      "updateMask": "privacy,registrantContact",
    }
    

    为要更改的 registrantContactadminContacttechnicalContact 替换以下值。如需详细了解每种类型的联系人,请参阅联系人隐私权

    • CONTACT_PRIVACY:联系人数据的首选隐私设置
    • REGION_CODE:地址的区域代码,例如 US 表示美国
    • POSTAL_CODE:地址的邮政编码,例如 94043
    • SUBDIVISION:地址的最高行政区划,如州、省、州或县(例如 CA 表示加利福尼亚州)
    • CITY:地址所在城市或城镇的名称,例如 Mountain View
    • ADDRESS:地址的较低级别,例如 1599 Amphitheater Parkway
    • CONTACT_NAME:联系人的姓名
    • ORGANIZATION:(可选)注册域名的组织的名称,例如 Doe Corporation
    • EMAIL_ADDRESS:联系人的电子邮件地址,例如 john@example.com
    • PHONE_NUMBER:采用国际手机号码格式的联系人的手机号码,例如 +1-800-555-0123
    • FAX_NUMBER:(可选)国际电话号码格式的联系人传真号码,例如 +1-800-555-0123

修改 DNS 设置

如需修改或配置注册的 DNS 设置(包括网域的权威域名服务器),请完成以下步骤。

控制台

  1. 在 Google Cloud 控制台中,前往 Cloud Domains 页面。

    前往 Cloud Domains

  2. 点击您要修改的域名。您还可以点击域名旁边的 更多来查看修改菜单。

  3. 如需修改 DNS 详细信息(包括 DNS 提供商选项和 DNSSEC 设置),请点击修改 DNS 详细信息。选择下表中的某个选项。

    DNS 提供商 说明 费用
    Cloud DNS Google 建议您使用 Cloud DNS 作为所有域名服务器的 DNS 提供商。需支付额外的 Cloud DNS 费用。如需了解详情,请参阅 Cloud DNS 价格页面
    Google Domains

    如果您选择此选项,可以使用 Cloud Domains 配置域名服务器,然后使用 Google Domains 配置 DNS 资源记录。

    注意:使用 Google Domains 不允许 API 访问。

    且无需支付额外费用。
    自定义域名服务器 如果您选择此选项,可以使用 Cloud Domains 配置域名服务器,然后使用第三方 DNS 提供商配置 DNS 资源记录。 请与您的 DNS 提供商联系。

  4. 点击保存

gcloud

使用 gcloud domains registrations configure dns 命令

gcloud domains registrations configure dns DOMAIN_NAME

DOMAIN_NAME 替换为注册网域的名称,例如 example.app

以下示例显示了将网域 example.com 的 DNS 提供商从 Google Domains 更改为 Cloud DNS 时的输出:

Your current DNS settings are:
googleDomainsDns:
 dsState: DS_RECORDS_UNPUBLISHED
 nameServers:
 ‐ ns-cloud-b1.googledomains.com
 ‐ ns-cloud-b2.googledomains.com
 ‐ ns-cloud-b3.googledomains.com
 ‐ ns-cloud-b4.googledomains.com
You can provide your DNS settings by specifying name servers, Cloud DNS
Managed Zone name or by choosing free name servers provided by
Google Domains
 [1] Provide name servers list
 [2] Provide Cloud DNS Managed Zone name
 [3] Use free name servers provided by Google Domains
 [4] cancel
Please enter your numeric choice (4):  2

Cloud DNS Managed Zone name:  example-app

Waiting for 'operation-1596738623568-5ac39ae74fa6f-1025c18d-9d3a4872' to
complete...done.
Updated registration [example.com].

API

使用 registrations.configureDnsSettings 方法

POST https://domains.googleapis.com/v1/projects/PROJECT_ID/locations/global/registrations/DOMAIN_NAME:configureDnsSettings

替换以下内容:

  • PROJECT_ID:您的项目的名称
  • DOMAIN_NAME:要更改其联系人设置的网域

请求正文可以是以下某一项:

  • 如需更新或改用自定义域名服务器,请执行以下操作:

    {
      "dnsSettings": {
        "customDns": {
          "nameServers": [
            "ns-cloud-a1.googledomains.com",
            "ns-cloud-a2.googledomains.com",
            "ns-cloud-a3.googledomains.com",
            "ns-cloud-a4.googledomains.com"
          ]
        }
      },
      "updateMask": "customDns"
    }
    

  • 如需更新或改用 Google Domains 域名服务器,请执行以下操作:

    {
      "dnsSettings": {
        "googleDomainsDns": {
          "dsState": "DS_RECORDS_UNPUBLISHED"
        }
      },
      "updateMask": "googleDomainsDns"
    }
    

关闭域名自动续订

Cloud Domains 中的所有域名都会自动续期。如需停止续订您的域名,请按以下步骤操作:

控制台

  1. 在 Google Cloud 控制台中,前往 Cloud Domains 页面。
  2. 前往 Cloud Domains
  3. 点击您要关闭自动续订的域名。
  4. 点击停用自动续订
  5. 停用自动续订对话框中,点击停用

gcloud

使用 gcloud domains registrations configure management 命令

gcloud domains registrations configure management DOMAIN_NAME \
    --preferred-renewal-method=renewal-disabled

DOMAIN_NAME 替换为注册网域的名称,例如 example.app

开启域名自动续订功能

控制台

  1. 在 Google Cloud 控制台中,前往 Cloud Domains 页面。
  2. 前往 Cloud Domains
  3. 点击要启用自动续订功能的域名。
  4. 点击启用自动续订
  5. 启用自动续订对话框中,点击启用

gcloud

使用 gcloud domains registrations configure management 命令

gcloud domains registrations configure management DOMAIN_NAME \
    --preferred-renewal-method=automatic-renewal

DOMAIN_NAME 替换为注册网域的名称,例如 example.app

后续步骤