Solved Browser reaches web by domain name but not by IP

Solved issue

banderas20

Active Member
Joined
Aug 1, 2018
Messages
102
Reaction score
42
Credits
799
Hi everyone.

I have a doubt.

If I point my browser to an specific web (let's say facebook.com), it works. So far so good.
Now I try to resolve its IP by command line with dig or host commands. dig returns the following:

Code:
facebook.com.        300    IN    A    31.13.83.36

Now, if I point my browser to that IP, it doesn't work.

Why is that so?

Thanks!
 


Because the site's not set to respond to an IP address. Facebook has servers all over the place, each with varied IP addresses and all in sync with each other. It may also have various subdomains on that same IP address. You're not sending a full DNS request.

For other sites, those with shared hosting, it's because there are many sites using that one IP address. That's not the case here, but it's fundamentally the same. When you request a site on shared hosting (of which there are many), you're asking for a specific domain name (and perhaps a specific page).

In this case, you're not sending any of that. You're just asking for an IP address and there's no incentive for them to answer by just an IP address. There can be all sorts of networking behind that IP address and, again, you're not sending a full request.

You'll likely find the same thing to be true with Google. They don't know what actual page you want to be delivered. I just tested and all I have is the IPv6 address - which is pretty darned specific but still doesn't resolve to Google.

There's also likely a CDN between them and you. Well, no... There certainly is a CDN between them and you.
 
Because the site's not set to respond to an IP address. Facebook has servers all over the place, each with varied IP addresses and all in sync with each other. It may also have various subdomains on that same IP address. You're not sending a full DNS request.

For other sites, those with shared hosting, it's because there are many sites using that one IP address. That's not the case here, but it's fundamentally the same. When you request a site on shared hosting (of which there are many), you're asking for a specific domain name (and perhaps a specific page).

In this case, you're not sending any of that. You're just asking for an IP address and there's no incentive for them to answer by just an IP address. There can be all sorts of networking behind that IP address and, again, you're not sending a full request.

You'll likely find the same thing to be true with Google. They don't know what actual page you want to be delivered. I just tested and all I have is the IPv6 address - which is pretty darned specific but still doesn't resolve to Google.

There's also likely a CDN between them and you. Well, no... There certainly is a CDN between them and you.
Hi. First of all, thanks for your reply.

I guessed it was something like that. I would like at least to see the full process a browser does behind the scenes. Can I see that?

Thanks a lot!
 
Hi. First of all, thanks for your reply.

I guessed it was something like that. I would like at least to see the full process a browser does behind the scenes. Can I see that?

Thanks a lot!
In firefox, if you right click the mouse and select "Inspect", the browser will open a window at the bottom of the web page that the browser is on. There's a row of items which you can further select, like "Network", "Performance", "Memory" etc. to see various details, and then further clicks can be made to gather more information. It may or may not be the info you are interested in, and some of it needs some background to understand, but it's there nonetheless.

The online browser is dependent on network interfaces, so networking tools that let the user know where it's connecting can be useful. There are numerous such tools, the terminal command: iftop, being the one used here mostly.

Another set of resources in the firefox browser is available by entering: about:about, in the address box where it will bring up a bunch of "about" strings each of which can be likewise entered into the address box to see various features of the browser's functioning.
 
Last edited:
I also use HTTP Header Spy in Chrome. I mostly use it for diagnostics or curiosity, and mostly the latter.
 
There are many websites that will show a list of the domains that are hosted at one IP address. Here is one example of many, which I found from a web search "find domains hosted at one ip address":


If you want to see what else is hosted at the same IP address as Linux.org, try this IP address: 104.26.14.72
 
If you want to see what else is hosted at the same IP address as Linux.org, try this IP address: 104.26.14.72

There could be a whole bunch of 'em and they'll potentially vary a bit. That's the CDN's IP address, the Cloudflare address. For better or worse, I don't actually know the site's real IP address.

It'll be similar if you look up my Linux Tips site. You'll likely only see the IP address provided by the CDN - and people in different regions will get different results as the site's cached at servers across the globe. I'm not actually sure how many end points the CDN provides. I could look it up, but it's quite a few.

Oh, if you want another good diagnostic/informative site, look up Mx Toolbox. Hmm... Yeah, I just looked and it's mxtoolbox.com. They still exist, but it looks like they actually have fewer tools than they used to have.
 

Members online


Latest posts

Top