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: 188.8.131.52 Address: 184.108.40.206#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 (220.127.116.11) 56(84) bytes of data. 64 bytes from 18.104.22.168: icmp_seq=1 ttl=238 time=78.2 ms 64 bytes from 22.214.171.124: icmp_seq=2 ttl=238 time=74.5 ms 64 bytes from 126.96.36.199: 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 188.8.131.52... 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 184.108.40.206 nameserver 220.127.116.11
Thanks for any hints.