Why would xbcd.com resolve to the localhost (127.0.0.1) on Linux (Ubuntu) and Android?

1

When

1) pinging xbcd.com I get 127.0.0.1

2) using a web browser and the URL xbcd.com leads me to the local webserver, if it exists.

I've tried this on Ubuntu 14.04, multiple networks/DNS, as well as on Android CM11 on multiple WiFi/DNS networks and T-Mobile network; each of those resolve with the localhost. Both OSX and Windows appear to complain no route to host.

How/Why is this happening? I found no documentation or material on the matter. I'm curious if this is some reserved URL and Linux (Ubuntu at least I've seen)/Android have acknowledged the URL and in the OS intentionally point back to the localhost.

Anyone have any idea? Are others seeing this or have noticed this ever?

UPDATE, required info from comment...

dig xbcd.com results:

; <<>> DiG 9.9.5-3-Ubuntu <<>> xbcd.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39824 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;xbcd.com. IN A

;; ANSWER SECTION: xbcd.com. 1972 IN A 0.0.0.0

;; Query time: 35 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Tue Sep 23 11:39:24 PDT 2014 ;; MSG SIZE rcvd: 53

getent hosts xbcd.com results:

0.0.0.0 xbcd.com

TryTryAgain

Posted 2014-09-23T18:34:21.840

Reputation: 195

what do you see if you lookup the name using dig? What do you see if you use getent? Update your question with details.

– Zoredache – 2014-09-23T18:39:05.517

Answers

4

The owner could have pointed it to 127.0.0.1 I get 0.0.0.0 when I check it.

Russ Huguley

Posted 2014-09-23T18:34:21.840

Reputation: 156

Really, I didn't know that was possible/allowed? Interesting. – TryTryAgain – 2014-09-23T18:46:03.623

Correct, wow: http://www.who.is/whois/xbcd.com shows that too. You learn something new everyday. Thanks

– TryTryAgain – 2014-09-23T18:47:21.433

4For that matter, there's nothing to stop you from returning a NS record with private IP space (127.0.0.1, 10.0.0.1, etc.) and tricking a recursive nameserver into passing queries along. BIND does not make any assumption about what IP spaces are bogus for authoritative lookups, and it must be specifically instructed to discard these NS records via the server directive. – Andrew B – 2014-09-23T20:11:52.540

@AndrewB thanks for the additional information on how NameServers work. – TryTryAgain – 2014-09-23T20:36:23.580

2

The domain resolves to the any address 0.0.0.0, which means the address of any interface on the host on which you are running.

Thus it is not very surprising that when you try to ping it, you get 127.0.0.1. You would get the same if you ping 0.0.0.0 directly without going through the domain name.

kasperd

Posted 2014-09-23T18:34:21.840

Reputation: 2 691