From the man pages of resolv.conf:
domain
Specifies the local domain name. Most queries fornames within this domain can use short names relative to the local domain. If no domain entry is present, the domain is determined from sysinfo(2) or fromgethostname(3C).
And from hosts, in the "name" section:
The last character
must not be a minus sign or period.