gcloud alpha domains registrations configure dns

NAME
gcloud alpha domains registrations configure dns - configure DNS settings of a Cloud Domains registration
SYNOPSIS
gcloud alpha domains registrations configure dnsREGISTRATION[--validate-only][--cloud-dns-zone=CLOUD_DNS_ZONE    |--dns-settings-from-file=DNS_SETTINGS_FILE_NAME    |--name-servers=NAME_SERVER,…,[…]    |--use-google-domains-dns][--async][--disable-dnssec][--unsafe-dns-update][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Configure DNS settings of a Cloud Domains registration.

In most cases, this command is used for changing the authoritative name serversand DNSSEC options for the given domain. However, advanced options like gluerecords are available.

EXAMPLES
To start an interactive flow to configure DNS settings forexample.com, run:
gcloudalphadomainsregistrationsconfigurednsexample.com

To use Cloud DNS managed-zoneexample-zoneforexample.com, run:

gcloudalphadomainsregistrationsconfigurednsexample.com--cloud-dns-zone=example-zone

DNSSEC will not be enabled as it may not be safe to enable it (e.g. when theCloud DNS managed-zone was signed less than 24h ago).

To use a signed Cloud DNS managed-zoneexample-zone forexample.com and enable DNSSEC, run:

gcloudalphadomainsregistrationsconfigurednsexample.com--cloud-dns-zone=example-zone--no-disable-dnssec

To change DNS settings forexample.comaccording to information from a YAML filedns_settings.yaml, run:

gcloudalphadomainsregistrationsconfigurednsexample.com--dns-settings-from-file=dns_settings.yaml

To disable DNSSEC, run:

gcloudalphadomainsregistrationsconfigurednsexample.com--disable-dnssec
POSITIONAL ARGUMENTS
Registration resource - The domain registration to configure DNS settings for.This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentregistration on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argumentregistration on the command line with a fullyspecified name;
  • location is always global.

This must be specified.

REGISTRATION
ID of the registration or fully qualified identifier for the registration.

To set theregistration attribute:

  • provide the argumentregistration on the command line.
COMMONLY USED FLAGS
--validate-only
Don't actually configure DNS settings of the registration. Only validatearguments.
Set the authoritative name servers for the given domain.
Warning:Donotchangenameserversifds_recordsisnon-empty.Cleards_recordsfirstbycallingthiscommandwiththe--disable-dnssecflag,andwait24hoursbeforechangingnameservers.Otherwiseyourdomainmaystopserving.
At most one of these can be specified:
--cloud-dns-zone=CLOUD_DNS_ZONE
The name of the Cloud DNS managed-zone to set as the name server for the domain.If it's in the same project, you can use short name. If not, use the fullresource name, e.g.:--cloud-dns-zone=projects/example-project/managedZones/example-zone.
--dns-settings-from-file=DNS_SETTINGS_FILE_NAME
A YAML file containing the required DNS settings. If specified, its content willreplace the values currently used in the registration resource. If the file ismissing some of the dns_settings fields, those fields will be cleared.

Examples of file contents:

googleDomainsDns:dsState:DS_RECORDS_PUBLISHEDglueRecords:-hostName:ns1.example.comipv4Addresses:-8.8.8.8-hostName:ns2.example.comipv4Addresses:-8.8.8.8
customDns:nameServers:-new.ns1.com-new.ns2.comdsRecords:-keyTag:24algorithm:RSASHA1digestType:SHA256digest:2e1cfa82b035c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d-keyTag:42algorithm:RSASHA1digestType:SHA256digest:2e1cfa82bf35c26cbbbdae632cea070514eb8b773f616aaeaf668e2f0be8f10d
--name-servers=NAME_SERVER,…,[…]
List of DNS name servers for the domain.
--use-google-domains-dns
(DEPRECATED) Use free name servers provided by Google Domains.

The --use-google-domains-dns option is deprecated; Seehttps://cloud.google.com/domains/docs/deprecations/feature-deprecations.

OTHER FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--disable-dnssec
Use this flag to disable DNSSEC, or to skip enabling it when switching to aCloud DNS Zone or Google Domains nameservers.
--unsafe-dns-update
(DEPRECATED) Use this flag to allow DNS changes that may make your domain stopserving.

The --unsafe-dns-update option is deprecated. To complete an unsafe DNSoperation first disable DNSSEC, then change name servers, then (optionally)enable DNSSEC.

GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gclouddomainsregistrationsconfiguredns
gcloudbetadomainsregistrationsconfiguredns

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-22 UTC.