Retrieving a domain name from an (?) IP address

(Forgive me if I am not getting the terminology quite right here.)

Occasionally, I come across a web site address (URL? URI? I have never understood the difference) given in numeric form. That is, instead of something like I see something like (That is a real one I came across lately. It is quite safe, don’t worry about the Number of the Beast in there.:eek:) As I understand it, the first numerical part is the actual IP address of the machine where the web page is hosted, and normally, when we enter a domain name into our browsers, the name is translated by the DNS into just such a number, and that is actually what the internet uses to find the relevant machine. (Is that right?) My question, however, is, if I am given a part-numerical URL like that one, is there a simple way for me to get to see the regular domain name that that number takes me to? If I click that link, or type it into my location bar, it takes me to the relevant site all right, but the location bar continues to display the address in its semi-numeric form, and even if I click on links to take me to other parts of the site, even the home page, it continues to be displayed that way. Is there a way for me to discover what the site address, the domain, is in normal “” (or whatever) form? The DNS system must contain this information, I guess, but can I access it? Is it difficult?

You don’t understand. The IP address is the real address of the server. The domain names assigned using *.com, etc, are not necessary, only convenient.

I do understand that perfectly well, thank you very much, even if I did not explain it very well in my post.

The IP address is meaningless to me however. Looking at it does not tell me anything about the site it might be taking me to. The domain name, by contrast, often does. For instance, I can see at a glance, even with out going there, if it is Google, or the Dope, or some other site that I trust, or some sketchy looking site, probably fullof porn and/or malware in Moldova or Kiribati. I know that the DNS translates domain names into IP addresses in order to actually find them. What I want to know, however, is how to find out the domain name (which might mean something to me) if I have only been given the IP address. Actually going to the site does not do that.

The problem is that it is a many-to-one mapping. An IP could be hosting both and and you wouldn’t know which one the IP would serve by default. But search Google for “ip lookup” and use those sites to get a rough idea.

What you want is a reverse DNS lookup. This site has one and there are many others.

But what J Cubed says still applies. Multiple domain names can map to the same IP address, and a reverse lookup won’t tell you which one is accurate.

Actually, this reverse lookup is better because it’ll tell you all the domain names it knows about, not just the official DNS record (which only needs one domain). My website’s virtual host returned 29 domain names under the same IP address, for example. The only thing my websites have in common with the other customers’ is that we all pay the same company for hosting. I don’t know who the other people are. (This is why it’s not a good way to judge trustworthiness.)

OK, I entered the IP from the example in my OP into the page at your link in your first post and it got me to a site in Germany: probably a web hosting company I guess. You are right. That does not really tell me what I want to know. I suppose the first bit of the directory path is what actually specifies the domain hosted there, right?

Using the site linked in your second post did not work: “We did not find any results for your search”.

So the problem is not really soluble in practice (for hosted domains, anyway)?

No, apparently you don’t understand, because you persist in asserting that a domain name must be associated with the IP address. It doesn’t have one.

If you want to know who owns the IP address, which appears to be your real question, just go to the International Assigned Numbers Association website and run whois on your target. WHOIS Service reveals that your IP address is administered by RIPE NCC, the regional Internet registry for Europe. A database lookup on their website – Webupdates — RIPE Network Coordination Centre – reveals that the address is assigned to the Fritz Haber Institute in Berlin, which is part of the Max Planck Society. All very respectable (well, not perfectly respectable – Haber was a prick – but I digress).

Now, both of these groups have domain names – the main domain for both of them is – and they appear to have mapped that domain to several IP addresses in the 141.14.x.x range, and MPG may very well own all of them. And had you entered 141.14.% into the reverse lookup above, you would have received a list of domain names associated with that range, all of which are probably associated with MPG. But there is no reason to assume that every IP address assigned to an organization is going to map to their domain, or to any domain at all.

You have this whole thing backwards. It’s like asking “given a zip code, can you tell me which house my letter is going to?” The IP address isn’t a shortcut to a domain name… it’s the other way around.

njtt, you should be aware that not all numerical IPs map to a text domain name. Our video server can be addressed only by the number; it has no name or DNS entry (which makes some security programs nervous and they block us).

And one domain name can map to multiple IP addresses:

% host has address has address has address has address has address has address has address has address has address has address has address has IPv6 address 2607:f8b0:400a:801::1000

This is done for load-balancing and, sometimes, as part of a content delivery network.

Hmm, in that case, how does a client know which IP to connect to? Does the DNS server do the load balancing, and if so, how does that work with standard times-to-live?

Round-robin DNS. In a manner of speaking, it’s the client that does the load balancing, by choosing one of the IPs somewhat randomly.

Missed the edit window - actually I had that a bit wrong. The client will almost always just choose the first IP; it is indeed the DNS server that does the load balancing. It’s a bit unpredictable because of caching and client behaviour, so it’s typically used as a crude first step in load balancing. Those IPs will in turn be heavy-duty load balancers.

Yes, I already did understand what you told me in your previous post. There were other things I did not not understand that others (not you) have now successfully made clear to me.

Technically, no. If both and are hosted at and you connect to directly, you won’t necessarily be able to tell which website you got.

The server can be configured to serve you anything – it could be site A, site B, an error message, or something else entirely.

In my experience, if Apache is set up without considering that someone might come in without specifying a hostname, it’ll serve the first domain it’s configured for, alphabetically. Otherwise, it’s whatever the server admin decides.