Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the difference between and in the search section of an /etc/resolv.conf file?

user@host /etc/sysconfig/network-scripts $ head -n 3 /etc/resolv.conf
# Generated by NetworkManager
share|improve this question
up vote 7 down vote accepted

. is the top-most point in the DNS hierarchy. com, org, net, etc are all under .. The reason that you don't see people type into their browsers or other applications is that over time, applications have been developed to "help" you by not requiring it. A proper FQDN still has a period at the end, though it doesn't matter much in most cases nowadays.

When you have multiple search suffixes that can be appended to a DNS query, specifying a period at the end will stop your client from trying to "help" you by appended additional suffixes. It basically is saying "This is the full, entire address. Don't try and append anything else."

share|improve this answer

Because fully qualified domain names always have a period at the end.

RFC 1034

Since a complete domain name ends with the root label, this leads to a
printed form which ends in a dot.  We use this property to distinguish between:

   - a character string which represents a complete domain name
     (often called "absolute").  For example, "poneria.ISI.EDU."

   - a character string that represents the starting labels of a
     domain name which is incomplete, and should be completed by
     local software using knowledge of the local domain (often
     called "relative").  For example, "poneria" used in the
     ISI.EDU domain.
share|improve this answer

If you do not have a '.' at the end, then other things from you search path might be appended to your hostname. However, I generally do not see this on search paths in /etc/resolv.conf files as the '.' at the end is used in a hostname specification.

If you /etc/resolv.conf had a search to include and when you request to resolve qqq, the resolver will try qqq, failing that try and then until either one succeeds or you have total failure.

In the same example if you put, the resolver would try, then try and in a similar manner.

If you put in (note the final period), the resolver only searches ONLY and does not append anything from the /etc/resolv.conf search path.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.