Invalid domains are rewritten to invaliddomain.hostname
Hi,
We have just set up our first server and a customer of ours has mentioned that they use the get_headers function in php to see if a domain is real. One of the examples he was going was fsdh. What he found was that our server was automatically changing this to fsdh.hostname and looking for that which was always returning a 200 response.
I have then done this through ssh and tried to ping fsdh and it then pings fsdh.hostname. Is this expected and is there anyway to get around this?
Thank you
-
Hi, Check /etc/resolv.conf file. Most probably you have set there domain or search as "hostname". This string is then concatenated to whatever you ping in case that the "string" that you're pinging is not resolvable directly(via DNS or via hosts file). This is a normal behaviour. Regards, Raul 0 -
Hi Raul, The contents of the resolv file are 8.8.8.8 and 8.8.4.4 the hosts file is 127.0.0.1 localhost.localdomain localhost localhost4.localdomain4 localhost4 # Auto-generated hostname. Please do not remove this comment. ip hostname localhost6.localdomain6 host localhost6 localhost.localdomain ::1 localhost I cant see anything wrong, am I missing anything? Any suggestions~ Thanks 0 -
Can you paste the entire resolv.conf file here? I'm interested in search or domain entries. 0 -
[quote="TheJudge, post: 1589511">Can you paste the entire resolv.conf file here? I'm interested in search or domain entries.
All its say in /etc/resolv.conf is the following: nameserver 8.8.8.8 nameserver 8.8.4.4 [COLOR="silver">- - - Updated - - - With you mentioning about the domain entries, I have just added domain hostname to it and the problem has been resolved. Thank you for mentioning it!0 -
I am happy to see that the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
5 comments