0

I have setup powerdns server, I'm satisfied with basic functionalities.

users in my domain are unable to access example.com unless they use www.example.com

when I use host command

 host example.com 127.0.0.1

I get

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> @localhost example.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45277
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;example.com.INA

;; AUTHORITY SECTION:
example.com.300INSOAdns.example.com. hostmaster.example.com. 1 86400 86400 604800 300

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Jan 29 11:06:15 2013
;; MSG SIZE  rcvd: 80

the query doesn't return server ip only when I use www.example.com or ftp.example.com is there is a work around for this?

Thanks

user1007727
  • 421
  • 5
  • 20

3 Answers3

2

OKay, I have found a solution, if you are using a nice UI such as (PowerDNS Webinterface) to manage your powerDNS server, you need to create an "empty" A record pointing to your IP address

example

  1. Add new record.
  2. Under value section "leave it empty" this will resemble the @ root zone file and have it point to your DNS IP address.
user1007727
  • 421
  • 5
  • 20
1

What you need is a root zone record. It is usually denoted @ and must be a host record, CNAME's can not be used

@ references the zone name itself, so if you need to resolve example.com you need a record named @ in the root of the zone example.com

Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95
  • unfortunately this didn't resolve my issue, I have added @ type A record and point to my server's IP address. but it is still giving me same host or dig results. – user1007727 Jan 29 '13 at 18:10
0

You did not specify which PowerDNS backend you used.

The @ syntax as mentioned by several people here does only work with the bind backend that uses BIND-style zonefiles.

If you used for example gmysql as a backend you would need to create a record by the name of "example.com" and the IP address you want it to point to as the content.

ZaphodB
  • 653
  • 3
  • 9