I have a strange problem with domain name resolution on my VPS. The problem is that when I do a ping, or telnet to a non-existing domain name, then the ".com" top level domain name gets automatically appended to the original domain name.
1) nslookup test
[root@myhost etc]# nslookup www.dhjfdghfgdhafgdh.com Server: 184.108.40.206 Address: 220.127.116.11#53 ** server can't find www.dhjfdghfgdhafgdh.com: NXDOMAIN
OK - expected result
2) ping test
[root@myhost etc]# ping -v www.dhjfdghfgdhafgdh.com PING www.dhjfdghfgdhafgdh.com.com (18.104.22.168) 56(84) bytes of data. 64 bytes from 22.214.171.124: icmp_seq=1 ttl=238 time=78.2 ms 64 bytes from 126.96.36.199: icmp_seq=2 ttl=238 time=74.5 ms 64 bytes from 188.8.131.52: icmp_seq=3 ttl=238 time=76.4 ms ^C --- www.dhjfdghfgdhafgdh.com.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2427ms rtt min/avg/max/mdev = 74.594/76.431/78.264/1.498 ms
NOK – non-existing domain gets resolved as “.com” somehow miraculously gets appended to the original domain. com.com is a registered domain name so I can ping it, but I am pinging a different domain then I intended to.
3) telnet test
[root@myhost etc]# telnet www.dhjfdghfgdhafgdh.com 80 Trying 184.108.40.206... Connected to www.dhjfdghfgdhafgdh.com. Escape character is '^]'.
NOK – same as ping. This time however, telnet does not tell me I am actually connected to the com.com host. I can only tell from the IP address.
This is my /etc/resolv.conf:
nameserver 220.127.116.11 nameserver 18.104.22.168
Thanks for any hints.