diff --git a/src/hostinfo/named.py b/src/hostinfo/named.py
index 353c8470684304367fdee75333172d901eda980b..68b499dc3de1a399a07f7e34a7af09a018a375de 100755
--- a/src/hostinfo/named.py
+++ b/src/hostinfo/named.py
@@ -133,6 +133,23 @@ def forward(tree, domain):
             pri = int(m.priority[0] or 0)
             result += "%-16sIN      MX      %d %s\n" % ("", pri ,fqn(tree, m._parent))
     result += ";\n"
+
+    # Add domain TXT entries
+    newline = False
+    for t in tree._subnet_._txt_:
+        if t.domain[1] == domain.domain[0]:
+            result += '                IN      TXT     "%s"\n' % (
+                t.value[0])
+            newline = True
+            pass
+        pass
+    if newline:
+        result += ";\n"
+        pass
+        
+    # Add a localhost entry
+    result += "localhost       IN      A       127.0.0.1\n"
+    result += ";\n"
                 
     host = {}
     def add_entry(name, kind, value):
@@ -172,10 +189,6 @@ def forward(tree, domain):
         add_entry(c.alias[0], 'CNAME', '%s' % c.name[0])
         pass
         
-    # Add a localhost entry
-    result += "localhost       IN      A       127.0.0.1\n"
-    result += ";\n"
-
     # Add hosts
     for h1 in sorted(host):
         for k,v  in sorted(host[h1]):