TECH / Servers & Websites 3 min read

How to Verify Domain Ownership with a DNS TXT Record (Panel, BIND & Check)

Antonio NEMCD Author
Published Aug 28, 2011 · 3 min

When connecting a domain to Google Search Console, Google Workspace, Microsoft 365, Cloudflare, or an email service, you are almost always asked to prove domain ownership with a DNS TXT record. Setup takes two minutes – either through your DNS provider’s dashboard or directly inside a zone file on your own BIND server.

Domain ownership verification using a DNS TXT record

Quick answer: open DNS management at whichever provider hosts your domain’s active NS servers, add a TXT record with host/name @ (root domain), paste the exact verification string (for example, google-site-verification=...) into the value field, and save.

Method 1. Via Your DNS Control Panel (Registrar, Host, or Cloudflare)

Most registrars and DNS hosts follow the exact same layout:

  1. Open the DNS zone editor for your domain.
  2. Click Add record and enter:
    • Type: TXT
    • Name / Host: @ (represents the root domain; some panels expect it blank or the full domain name).
    • Value / Content: the full verification string with no extra leading or trailing spaces (e.g., google-site-verification=q5NOpL77A...).
    • TTL: leave at default (usually 300–3600 seconds or Auto).
  3. Save the record, wait 2 to 15 minutes for DNS propagation, and click Verify in the service.

Method 2. On Your Own BIND DNS Server

If you run self-hosted BIND name servers, append a TXT line to your domain’s zone file:

@   3600   IN   TXT   "google-site-verification=q5NOpL77A"

Then make sure you:

  1. Increment the Serial number in the zone’s SOA record so secondary DNS servers pull the update.
  2. Validate the zone syntax and reload BIND:
    sudo named-checkzone example.com /etc/bind/db.example.com
    sudo rndc reload

Why Google Still Cannot Find Your TXT Record

This is the number-one question in the comments. Check two things first:

  1. You edited the wrong DNS provider. I once added a TXT record at my registrar and waited hours before realizing the domain’s NS records pointed to another DNS host (like Cloudflare or my web host), meaning registrar DNS records were completely ignored. Check your live NS and TXT records right from the terminal:
    # Linux / macOS:
    dig NS example.com +short
    dig TXT example.com @8.8.8.8 +short
    
    # Windows (cmd / PowerShell):
    nslookup -type=TXT example.com 8.8.8.8
  2. Should you delete the TXT record after verification? No – leave it in place. Google Search Console and email providers re-check ownership periodically, and keeping the TXT record has zero performance impact.

More on securing DNS: what a DNS CAA record is and how to protect your SSL certificates. If you register domains in Ukraine and want clean DNS management, check out nic.ua (affiliate link).

The moment dig or nslookup against 8.8.8.8 returns your verification string, hitting Verify in Google succeeds on the first try.

Related posts:

Leave a Comment