Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What's the difference between server.com and server.com. 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
domain sub.company.com
search sub.company.com sub.company.com. company.com. company.com
share|improve this question

3 Answers 3

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 http://google.com. 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 aaa.domain.com and bbb.domain.com when you request to resolve qqq, the resolver will try qqq, failing that try qqq.aaa.domain.com and then bbb.domain.com until either one succeeds or you have total failure.

In the same example if you put ddd.domain.com, the resolver would try ddd.domain.com, then try ddd.domain.com.aaa.domain.com and ddd.domain.com.bbb.domain.com in a similar manner.

If you put in ddd.domain.com. (note the final period), the resolver only searches ddd.domain.com 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.