Schroedinger's DNS?? Can't resolve host when adding http.. help!
Schroedinger's DNS?? Can't resolve host when adding http.. help!
This makes no freakin sense to me, and it's driving me bonkers. Censored for work purposes obv.
Hosts file:
1.1.1.1 site.com
$ping site.com
PING site.com (1.1.1.1)
^C
$ping http://site.com
ping: unknown host http://site.com
What?? Ping, You JUST RESOLVED site.com, why can't you resolve it now??
Why does the addition of the protocol break DNS resolution?
It's CentOS 6.10, quite old..
/etc/nsswitch has:
hosts: files dns
Any pointers would be much appreciated.
You're viewing a single thread.
All Comments
8 comments
http://site.com isn't a valid host name, DNS won't resolve it. DNS does not understand protocol, it's taking your whole query as the hostname
46 0 ReplyAh thanks, that's my problem, it's me.
15 1 Reply
8 comments
Scroll to top