Add TXT record to bind9 DNS record for google site verification on Debian

Difficulty: 1/5 – It is very easy to do, you just need to follow few simple steps.

For the purposes of this article, your DNS has already been configured and your server/domain is accessible. You just need to add Google (or any other provider) Apps TXT verification to your DNS zone file. Replace any “” occurences with your domain name and “111.222.333.444” with your server’s IP.

First, test bind configuration for errors to make sure everything is working fine and you are not introducing new code to a faulty system – makes it hard to debug any problems that may arise.

# named-checkconf /etc/named.conf

You get no messages if everything is working as it should.
Now open for editing your DNS record file:

# nano /var/cache/bind/

Make sure you increase version number by 1. Standard is to use today’s date “YYYYMMDD” followed by two digit version number “01” for that day. For example, third edit on 2020 June 16th will result in 2020061603. Tomorrow you start at 2020061701 🙂
Add TXT record at the end of the file:

$TTL 3600       ; 1 hour  IN      SOA (
                         86400 )
                         A       111.222.333.444
                         MX      10
                         MX      20
www                     A       111.222.333.444
*                       IN      CNAME
@               IN      TXT     "google-site-verification=xxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxx"

Save the file and reload bind:

# service bind9 reload

Now test your configuration using one of the tools available online like the one from UltraTools. Enter your and you will see new record in TXT section. Now you are ready to verify with Google Apps.

Useful external links. Checked as working when this post has been made.
Debian Bind9 documentation
How to check DNS files for errors
Wiki – TXT records
UltraTools – DNS Lookup Result
mx Supertool