Question

All invalid requests end up at searchguide.level3.com....

  • Posted July 12, 2014

Basically if I make a request to some non-existent host, I get a response from searchguide.level3.com which makes it impossible to tell which http requests actually went through and which one’s didn’t. The other interesting part is that this only happens about 30% of the time. This is what I’m talking about:

var_dump(file_get_contents("http://www.aaaabinsafdg.com/"));
exit;

That URL obviously does not exist. This is the response I get 2 out of 3 times:

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/test3.php on line 8

Warning: file_get_contents(http://www.aaaabinsafdg.com/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/test3.php on line 8
bool(false)

Makes sense as such host does not exist on the Internet. Now this is what I get other times:

string(295) "<html><head><meta http-equiv="refresh" content="0;url=http://searchguide.level3.com/search/?q=http://www.aaaabinsafdg.com/&t=0"/></head><body><script>window.location="http://searchguide.level3.com/search/?q="+escape(window.location)+"&r="+escape(document.referrer)+"&t=0";</script>
</body></html>"

Why would I want this and how do I turn it off?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Edit /etc/resolv.conf and replace its contents with the following:

nameserver 8.8.8.8
nameserver 8.8.4.4

Then edit /etc/network/interfaces if you’re on Debian/Ubuntu or /etc/sysconfig/network-scripts/ifcfg-eth0 if you’re on CentOS/Fedora and replace 4.2.2.2 with 8.8.8.8.