NXDOMAIN is meant to mean that the domain name has no address. So when requesting foo.example.org:
- If A(foo.example.org) exists -> NOERROR.
- If AAAA(foo.example.org) exists -> NOERROR.
- If CNAME(foo.example.org -> test.example.org) exists then the response code is the same as if A(test.example.org) was requested.
The query type doesn't matter. Where we currently fail is if you query for CNAME we don't do the follow on lookups to determine if the response code should be NOERROR or NXDOMAIN. We just return NOERROR as a CNAME record was found.
NXDOMAIN is meant to mean that the domain name has no address. So when requesting foo.example.org:
The query type doesn't matter. Where we currently fail is if you query for CNAME we don't do the follow on lookups to determine if the response code should be NOERROR or NXDOMAIN. We just return NOERROR as a CNAME record was found.