gcloud alpha domains registrations configure dns Stay organized with collections Save and categorize content based on your preferences.
- 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 for
, run:example.comgcloudalphadomainsregistrationsconfigurednsexample.comTo use Cloud DNS managed-zone
forexample-zone, run:example.comgcloudalphadomainsregistrationsconfigurednsexample.com--cloud-dns-zone=example-zoneDNSSEC 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-zone
forexample-zoneand enable DNSSEC, run:example.comgcloudalphadomainsregistrationsconfigurednsexample.com--cloud-dns-zone=example-zone--no-disable-dnssecTo change DNS settings for
according to information from a YAML fileexample.com, run:dns_settings.yamlgcloudalphadomainsregistrationsconfigurednsexample.com--dns-settings-from-file=dns_settings.yamlTo 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 the
projectattribute:- provide the argument
registrationon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
registrationon 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 the
registrationattribute:- provide the argument
registrationon the command line.
- provide the argument
- provide the argument
- 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.
- 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.
--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 helpfor 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:
gclouddomainsregistrationsconfigurednsgcloudbetadomainsregistrationsconfiguredns
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.