{"id":1587,"date":"2020-09-22T11:24:45","date_gmt":"2020-09-22T08:24:45","guid":{"rendered":"https:\/\/helia.ee\/koolitus\/?page_id=1587"},"modified":"2020-09-22T11:24:45","modified_gmt":"2020-09-22T08:24:45","slug":"debian-add-txt-record-to-bind9-dns-record-for-google-site-verification-on-debian","status":"publish","type":"page","link":"https:\/\/helia.ee\/koolitus\/?page_id=1587","title":{"rendered":"Debian &#8211; Add TXT record to bind9 DNS record for google site verification on Debian"},"content":{"rendered":"<p>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 \u201cdomainname.com\u201d occurences with your domain name and \u201c111.222.333.444\u201d with your server\u2019s IP.<\/p>\n<p>First, test bind configuration for errors to make sure everything is working fine and you are not introducing new code to a faulty system \u2013 makes it hard to debug any problems that may arise.<code><\/code><\/p>\n<div>\n<div id=\"highlighter_689043\" class=\"syntaxhighlighter nogutter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash comments\"># named-checkconf \/etc\/named.conf<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>You get no messages if everything is working as it should.<br \/>\nNow open for editing your domainname.com DNS record file:<\/p>\n<div>\n<div id=\"highlighter_390743\" class=\"syntaxhighlighter nogutter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash comments\"># nano \/var\/cache\/bind\/db.domainname.com<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Make sure you increase version number by 1. Standard is to use today\u2019s date \u201cYYYYMMDD\u201d followed by two digit version number \u201c01\u201d for that day. For example, third edit on 2020 June 16th will result in 2020061603. Tomorrow you start at 2020061701 \ud83d\ude42<br \/>\nAdd TXT record <strong>at the end<\/strong> of the file:<\/p>\n<div>\n<div id=\"highlighter_885975\" class=\"syntaxhighlighter nogutter  plain\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"plain plain\">$ORIGIN .<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"plain plain\">$TTL 3600\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ; 1 hour<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"plain plain\">domainname.com\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 SOA\u00a0\u00a0\u00a0\u00a0 ns1.domainname.com. root.domainname.com. (<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">2020061603<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">10800<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">3600<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">604800<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">86400 )<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">NS\u00a0\u00a0\u00a0\u00a0\u00a0 ns1.domainname.com.<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">NS\u00a0\u00a0\u00a0\u00a0\u00a0 ns3.domainname.com.<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">NS\u00a0\u00a0\u00a0\u00a0\u00a0 ns4.domainname.com.<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 111.222.333.444<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">MX\u00a0\u00a0\u00a0\u00a0\u00a0 10\u00a0\u00a0\u00a0\u00a0\u00a0 mx.google.com.<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"plain spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"plain plain\">MX\u00a0\u00a0\u00a0\u00a0\u00a0 20\u00a0\u00a0\u00a0\u00a0\u00a0 mx2.google.com.<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"plain plain\">$ORIGIN domainname.com.<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"plain plain\">www\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 111.222.333.444<\/code><\/div>\n<div class=\"line number17 index16 alt2\"><code class=\"plain plain\">*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 CNAME\u00a0\u00a0 domainname.com.<\/code><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"plain plain\">@\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IN\u00a0\u00a0\u00a0\u00a0\u00a0 TXT\u00a0\u00a0\u00a0\u00a0 \"google-site-verification=xxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxx\"<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Save the file and reload bind:<\/p>\n<div>\n<div id=\"highlighter_7098\" class=\"syntaxhighlighter nogutter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash comments\"># service bind9 reload<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Now test your configuration using one of the tools available online like the one from <a href=\"https:\/\/www.ultratools.com\/tools\/dnsLookupResult\" target=\"_blank\" rel=\"noreferrer noopener\">UltraTools<\/a>. Enter your domainname.com and you will see new record in TXT section. Now you are ready to verify with Google Apps.<\/p>\n<p>Sellel lingil tasuks kontrollida kas ikka toimib <a href=\"https:\/\/www.ultratools.com\/tools\/dnsLookupResult\">https:\/\/www.ultratools.com\/tools\/dnsLookupResult<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 \u201cdomainname.com\u201d occurences with your domain name and \u201c111.222.333.444\u201d with your server\u2019s IP. First, test bind configuration for errors [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":621,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-1587","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1587"}],"version-history":[{"count":1,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1587\/revisions"}],"predecessor-version":[{"id":1588,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/1587\/revisions\/1588"}],"up":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/621"}],"wp:attachment":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}