How to Enter TXT Values in Google Cloud DNS?

by

Last Updated:
5 min read
How to Enter TXT Values in Google Cloud DNS?

Key Takeaways

  1. Google Cloud DNS can be complex to navigate, especially when adding TXT records.
  2. TXT records are essential for domain ownership verification and email security protocols like SPF, DKIM, and DMARC.
  3. Following a step-by-step approach can help you effectively add and verify Google TXT records.
  4. It is important to verify TXT records to avoid errors and ensure proper functioning of your domain.
  5. Maintaining and updating TXT records can enhance email authentication and protect against phishing and spam attacks.

Google Cloud DNS is a powerful, enterprise-grade global domain name system service, but its interface can sometimes feel complex if you are publishing TXT records for the first time. Making formatting errors or entering inaccurate values can result in invalid record data or verification failures.

This comprehensive guide explains how to properly enter, manage, and verify TXT values in Google Cloud DNS to ensure seamless email security, domain validation, and brand protection.

Introduction to Google Cloud DNS 

Google Cloud DNS is an efficient global Domain Name System service that’s used for publishing domain names. It’s the second most popular cloud DNS in the top 1 million sites in the enterprise DNS category. You can store, manage, and view your IP addresses and other data. You can access both public and privately managed zones. Moreover, it creates internal DNS names for VMs automatically, even for non-users.

Google Cloud DNS forwarding zones configure target name servers for individual private zones to set outbound DNS forwarding from the VPC or Virtual Private Cloud network.  

Simplify Security with PowerDMARC!

Importance of TXT values

Google TXT record allows you to enter text into the DNS. It was originally introduced as a zone where human-readable notes can be stored, but now you can also enter machine-readable notes. It’s more commonly used by Google and Gmail as a means of spam and phishing prevention and domain ownership verification. 

When Google detects that you have successfully added the TXT record, it verifies your domain ownership. 

It’s also used for securing emails to avert malicious activities attempted by hackers. This is done using:

  • SPF records that highlight emails sent by unauthorized entities.
  • DKIM protocol that uses a cryptographic signature to verify that the email was sent by the domain owner and has not been altered in transit.
  • DMARC authentication that sets a policy on how receiving mail servers should handle emails that fail SPF and DKIM authentication checks and identifier alignment with your domain.
  • BIMI process that helps you add a verified brand logo to emails authenticated with DMARC. 
  • MTA-STS that’s used to enhance security for SMTP connections when both sending and receiving servers use this standard.

Adding Google TXT record: Step-By-Step Instructions

Here are some prerequisites for adding Google TXT records:

  • An active Google Cloud account with access to the Google Cloud Console.
  • A properly configured public DNS zone within Cloud DNS.

Step-By-Step Instructions

  1. Login to your Google Cloud account.
  2. Click on Networking, go to Networking Services, and select Cloud DNS.
  3. You will be taken to the Google Cloud DNS configuration page where you can see the current zone record.
  4. Click on your zone name and you will come across a page showing detailed settings information for your zone.
  5. Click on Add standard. 
  6. Create your record using the reference from the table below: 

Enter the information above into your Google Cloud DNS

DNS Name Leave blank to apply the record to your root domain. 
Resource Record Type Select TXT from the dropdown menu.
TXT Data Enter your unique verification string enclosed in double quotes (e.g.:  google-site-verification=unique-code-here).
  1. Select the Create button to save the entry. Your Google TXT  record is created in your zone file.
  2. Once created, DNS propagation will begin. This process is governed by the Time-To-Live (TTL) value; resolvers that have cached older query results will wait for the cache duration to expire before fetching the updated record from Google Cloud DNS.
  3. Verify your Google TXT record using the steps mentioned below.

Verifying Google TXT records 

Verifying Google TXT records ensures there is no error in it. You can do this using a DNS TXT record lookup tool that lets you query your DNS to review the record published on your domain. It reveals if there are any syntax or configuration errors in your records. You can easily remediate the errors to ensure your website runs properly. It helps you verify ownership of your domain. An error-free Google TXT record is important to implement SPF, DKIM, and DMARC protocols for enhanced email security.

Updating and Maintaining TXT Records in Google Cloud DNS

To update an existing TXT resource record set, follow these steps:

  • In the Google Cloud console, go to the Cloud DNS zones page.
  • Go to Cloud DNS zones
  • Click the zone for which you want to update the resource record set.
  • On the Zone details page, next to the resource record set that you want to update, click the Edit icon.
  • After making the necessary updates, click Save.

Note: You cannot enter conflicting data; for example, if two records have the same name, they must be of different types. The only exception is if one of them is a CNAME record, in which case only the CNAME record can exist.

The Role of TXT Values in Email Security: SPF, DKIM, and DMARC

TXT records are the backbone of modern email authentication. When external mail servers receive messages claiming to be from your domain, they perform DNS lookups on these TXT records:

  • SPF (Sender Policy Framework): This TXT record lists authorized IP addresses and subnets. Receivers inspect this list to verify if the sender’s IP is permitted.

  • DKIM (DomainKeys Identified Mail): This protocol uses a cryptographic signature to verify message integrity. The domain owner publishes the DKIM public key in a TXT record (stored within the p= tag of the key’s selector subdomain record). The private key remains secure on the signing mail server and is never published to DNS.

  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Published as a TXT record, DMARC instructs receivers on how to handle messages that fail DMARC validation. According to RFC 9989 (which officially obsoleted RFC 7489 in May 2026), a message passes DMARC validation only when SPF or DKIM checks pass, and the domain used in those checks aligns with the domain in the visible From: header (RFC5322.From). Depending on the policy specified in your DMARC TXT record (p=none, p=quarantine, or p=reject), non-compliant and unaligned emails will be routed or rejected accordingly.

google txt