# Using name resolution in syslog-ng

The AxoSyslog application can resolve the hostnames of the clients and include them in the log messages. However, the performance of AxoSyslog is severely degraded if the domain name server is unaccessible or slow. Therefore, it is not recommended to resolve hostnames in `syslog-ng`. If you must use name resolution from `syslog-ng`, consider the following:

  * Use DNS caching. Verify that the DNS cache is large enough to store all important hostnames. (By default, the AxoSyslog DNS cache stores `1007` entries.)

Terminal window
```
options { dns-cache-size(2000); };
```

  * If the IP addresses of the clients change only rarely, set the expiry of the DNS cache large.

Terminal window
```
options { dns-cache-expire(87600); };
```

  * If possible, resolve the hostnames locally using the `use-dns(persist_only)` option. For details, see [Resolving hostnames locally](../../docs/axosyslog-core/4.26/chapter-examples/examples-dns/example-local-dns/index.md).




Note Domain name resolution is important mainly in relay and server mode. 

* * *

[Resolving hostnames locally](../../docs/axosyslog-core/4.26/chapter-examples/examples-dns/example-local-dns/index.md)

Last modified August 4, 2026: [Update content/chapter-examples/examples-dns/_index.md (0db03370)](<https://github.com/axoflow/axosyslog-core-docs/commit/0db03370543c499f746a236338e8e17eaafc63c7>)