How did nginx resolve names?

Francis Daly francis at
Wed Mar 10 14:15:17 UTC 2021

On Tue, Mar 09, 2021 at 08:05:02PM -0500, andromeda123 wrote:

Hi there,

> Can you please elaborate why start-up DNS resolution does not use `resolver`
> directive? Just the way run time resolution does?

At a guess -- there does not need to be exactly one resolver directive;
and there is no need to avoid the system resolver at startup because
things are under less time pressure then.

The "resolver" directive takes the address of a DNS server. The system
resolver may or may not use DNS -- applications don't have to care what
it uses, just that it works.

> A follow up question - 
> Is it feasible to use system resolver as the run time resolver by explicitly
> adding it to the `resolver` directive?

You can use the same DNS server that the system resolver uses,
yes. (Assuming your system resolver uses a DNS server.) But you won't
be using "the system resolver".

The difference there may not be important.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list