Skip to content

Manage DNS on Google Cloud

Use this guide to manage DNS at Google Cloud.

Requirements

You’ll need the following before you can manage DNS at Google Cloud:

  • A Google Cloud account and project.
  • A domain you’ve registered at any domain registrar.

Learn how to create a Google Cloud account and project.

Manage DNS zones

All DNS records belong to a DNS zone.

Create a DNS zone

Before you can create a DNS zone, you must first enable the Cloud DNS API in your project.

  1. Go to the Cloud DNS API page in Google Cloud console.
  2. Click Enable. If there is no Enable button, then the Cloud DNS API is already enabled for this project.

Use your registered domain name as the name of your DNS zone. A registered domain name, also known as an apex domain, is a domain such as example.com.

  1. In Google Cloud console, go to the Cloud DNS Zones page.
  2. Click Create Zone.
  3. In the form, enter the following values and leave all other fields set to their defaults values:
    • Zone name — Your registered (apex) domain with the periods replaced with hyphens (-).
    • DNS name — Your registered (apex) domain.
  4. Click Create.

Update nameservers

DNS queries for your domain will be answered by Google Cloud’s DNS servers after you update your domain’s nameservers at your domain registrar.

Use the following instructions to get the nameservers for your DNS zone.

  1. In Google Cloud console, go to the Cloud DNS Zones page.
  2. Click on the name of the DNS zone.
  3. Click on the DNS record that has the type “NS”.
  4. The four values in the “Routing data” table are the nameservers for your DNS zone.

Once you know the nameservers for your DNS zone, do the following:

  1. Log into your domain registrar (the site where you purchased your domain).
  2. Select your domain and choose the option to edit the domain’s nameservers.
  3. Add the Google Cloud DNS nameservers. Do not include a period at the end of nameserver values.
  4. Remove the old nameservers.

Delete a DNS zone

When you delete a DNS zone, the zone and its records will be deleted.

  1. In Google Cloud console, go to the Cloud DNS Zones page.
  2. Click on the name of the DNS zone.
  3. Click on Delete zone.
  4. In the confirmation dialog box, enter the name of the zone then click Delete.

Manage DNS records

Create and delete DNS records in your DNS zone.

Create a DNS record

Use the instructions below to create a DNS record.

  1. In Google Cloud console, go to the Cloud DNS Zones page.
  2. Click on the name of the DNS zone.
  3. Click on Add standard.
  4. For the DNS Name, enter the subdomain the DNS record is for or leave empty if the DNS record is for your registered (apex) domain.
  5. For the Resource record type, select the type of DNS record you want to create.
  6. For the DNS record’s value, set the desired value.
  7. Click Create.

Delete a DNS record

Use the instructions below to delete a DNS record.

  1. In Google Cloud console, go to the Cloud DNS Zones page.
  2. Click on the name of the DNS zone.
  3. Click the DNS record you want to delete.
  4. Click on Delete resource record set.
  5. In the confirmation dialog box, click on Delete.