Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

domain entry

&pagelevel(5)&pagelevel

domain domain


The domain entry defines a default domain for the requests of the DNS resolver daemon to the DNS name server(s).

The following must be observed here:

  • A maximum of one domain entry can be valid in the configuration file /etc/resolv.conf. If the configuration file contains several domain entries but no search entries, the last domain entry applies.

  • domain and search entries invalidate each other, so if there are several domain and search entries in the configuration file, the domain entry and search entry which apply are those which are not followed by a further domain or search entry.

The function of the domain entry depends on whether or not the DNS name specified in the DNS request contains a dot (.).

The following description applies for the default setting of the ndots parameter in the options entry (see "options entry").

  • Function of the domain entry if the DNS name contains a dot:

    If the DNS server cannot reply successfully to a DNS request for a name name, the DNS resolver daemon sends another DNS request with name.domain to the DNS server. If this DNS request also fails, the DNS resolver daemon sends a further DNS request with the higher-level domain to the DNS server. This procedure can be continued up to a DNS request in which the appended domain is one level below the top level.

    Example

    The following example shows the requests generated by the DNS resolver daemon to a DNS server.

    Entry in the configuration file /etc/resolv.conf:

    domain mch.fj.example

    Name specified by the user:

    my.host

    Name generated by the DNS resolver daemon for requests to a DNS server:

    1. my.host

    2. my.host.mch.fj.example

    3. my.host.fj.example

  • Function of the domain entry if the specified DNS name does not include a dot:

    If a DNS request for a name name.domain cannot be successfully answered by the DNS server, the DNS resolver daemon issues a new DNS request with name to the DNS server.

    Example

    The following example shows the requests to a DNS server generated by the DNS resolver daemon.

    Entry in the configuration file /etc/resolv.conf:

    domain mch.fj.example

    Name specified by the user:

    myhost

    Name generated by the DNS resolver daemon for requests to a DNS server:

    1. myhost.mch.fj.example

    2. myhost.fj.example

    3. myhost