DNS lookup without search domains

I’m doing DNS requests using the standard Net library using Resolver.LookupIPAddr with a custom dialer so I can specify the nameserver I want to use. If a look up fails then it repeats the lookup using the search domains from my resolv.conf.

If I lookup abc.blah.com and it fails, it then does abc.blah.com.int and the same with my other domains.

Is it possible to stop this behaviour? All I want is a single lookup of the exact name I specify.

I just found the answer, doing a request with a trailing dot, for example “abc.blah.com.”, will cause the lookup to ignore the search domains and just make the single request.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.