- Red Hat Enterprise Linux (RHEL)
- Need more than 6 domains in the resolv.conf search list.
- Only the first 6 domains in the search path are looked up by the resolver.
- The release notes for RHEL7.5 indicate the 6 search domain limit has bee removed. However, that does not appear to be the case, at least for RHEL8.1.
glibc has its own name resolver which is widely used. Prior to
glibc-2.17-222 there is limitation of up to 6 search domains to be appended to the queried name when attempting to resolve it. Past that version this limit has been removed and you may add any amount of search domains to
It's important to note that programs that don't make use of the glibc's resolver may have their own limitations. That's the case of
dig, for example, which has its own name resolution implementation and doesn't use glibc's resolver.
dig has its own limit of 8 search domains.
On older versions of glibc the search list is limited to six domains with a total of 256 characters.
The limit is specified by glibc source at resolv/resolv.h as below:
# define MAXDNSRCH 6 /* max # domains in search path */
This cannot be modified for RHEL 6.x and below, but this limit has been removed in RHEL 7 and higher for glibc package versions at or exceeding
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.