I have a CeontOS 5.6 box. When I
lynx sjdhfgjsdhfgs123123.com (a non-existent domain) it opens search.com instead 404.
I thought this is because of the DNS servers used, so I tried it on a windows box with the same DNS servers, but I get 404 as expected on it.
How can I get rid of search.com on CentOS?
The problem was because of the missing
search option in the resolv.conf file. Yes, faker suggested to add it, but the problem was that I restarted the network service after adding it and the DHCP client overwritten the resolv.conf file.
I think the
search option is written in resov.conf file by default even if using dhcp client, but, apparently because of having multiple ethernet controllers and each controller having it's own dhcp client configuration it didn't add the 'search' option to resolv.conf.
I reconfigured now the dhcp client configuration to add
search to resolv.conf and the domain resolving works as expected.
Thanks to faker. I wouldn't came to this result without him)