I have some local domains, and I want them to be accessible over ipv6 only. I'm using unbound.

local-zone: "example.com" redirect
local-data: "example.com. 2562000 IN NS 2607:XXXX:XXXX:XXX::XXX"
local-zone: "test.example.com" redirect
local-data: "test.example.com. 2562000 IN NS 2607:XXXX:XXXX:XXX::XXX"
local-data: "test.example.com. 2562000 IN AAAA 2607:XXXX:XXXX:XXXX::XXX"

But I can't find for sure, if you are allowed to have IPV6 addresses as NS records, as pretty much every one I find in the internet uses domains...

1 Answer 1


NS records can only ever have names as their value. No IPv4 addresses, no IPv6 addresses.

Ie, you need a name with address records (A and/or AAAA) that you can refer to in the NS record.

  • Weird. Are you sure? Then why my apps aren't having any issues with the ǸS records being ipvx addresses ?
    – Freedo
    Commented Jan 13, 2021 at 8:17
  • @Freedo ipvx? If you mean ipv4, I think you are getting things confused. If you were to write an ipv4 address as the value that would be parsed as an all-numeric name (as the value can only ever be a name and the format is compatible). That would however be a name that doesn't exist (NXDOMAIN). Other than human input, DNS is not text-based, things have clearly defined types. Commented Jan 13, 2021 at 8:26
  • I see. Is it ok to make the ns record be my own domain ? like domain example.com and ns record is example.com.
    – Freedo
    Commented Jan 13, 2021 at 8:29
  • @Freedo Technically yes, however I would suggest eg ns.example.com in that case, so that you can use example.com for whatever you like. (Also, expect that people may have overlooked the option of using example.com there as practically no one does that, potentially throwing a fit over it when you try to delegate there or if you run some validity check.) Commented Jan 13, 2021 at 8:34
  • OK thanks. I'll only use this domain in unbound with my devices connected directly to it, so I don't publicly control the domains. thanks for the info!
    – Freedo
    Commented Jan 13, 2021 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .