I have a bind zone with an entry:
ns NS localhost.
this gives the error: "zone has no NS records"
changing it to the following solves the error.
@ NS localhost.
Can somebody explain why the first option isn't a valid NS record?
If your input file includes something like this:
Then:
Is equivalent to:
Whereas:
Is equivalent to:
In the first example, using
@
, you are specifying anNS
record for the domainexample.com
. In the second example, you are specifying anNS
record for the domainns.example.com
. So you're getting that error because the domain you've told BIND about --example.com
-- does not have any nameserver records.