Another forum I haunt was down due to the registration expired at the DNS registrar(?). It came back two days later. Would we have been able to get to the site typing in the IP address at that time? Would I want to try just using the xxx.xxx.xxx.xxx in the address bar to speed up access to the site if my chosen DNS server is busy? What are the +/-'s of doing it that way? How would I get the IP address from the site now? I will assume the hosting site has given it a static address. Or doesn’t it work that way?
Yes, if it’s just a DNS issue, you can type in it’s IP address and still get there. But if you want to go that route, you’d have to either know their IP address ahead of time or find it somewhere online. You won’t be able to get it directly from the site if you can’t get to the site.
As far as it being faster, I’m sure it is, technically, but we’re talking about thousandths of a second.
As far trying it, go ahead, it’s not going to do any harm.
If the site is accessed via HTTPS, I think going with direct IP instead of the DNS name is going to create security certificate issues.
It does depend somewhat on how the web server(s) is(/are) configured. For example, some sites may share their hosting infrastructure with others. A web server might be configured to serve up somewebsite.com on IP address xxx.xxx.xxx.xxx and anotherwebsite.com if an appropriate hostheader is included in the request to IP address xxx.xxx.xxx.xxx. You might be trying to reach anotherwebsite.com by entering it’s IP address, but the web server may respond with somewebsite.com instead.
It does. I just tried going to boards.straightdope.com using the IP address and got a 502 “project shield” error. My browser wouldn’t let me bypass it, even when I accepted the security threat.
I also tried, with two sites, pinging and tracert’ing with ip address as well as their web address. Unfortunately, both ping and tracert go and get the IP address before they start timing anything. Reaching out to the DNS doesn’t appear to be part of the calculations.
Even with plaintext HTTP, if the server is configured to expect a certain hostname in the request’s HTTP headers then it won’t work. Because your HTTP client will send a header of Host: 192.168.1.1 instead of Host: whateverboard.com.
However, you could get around this by setting up your own local DNS server and manually adding the host, or using a /etc/hosts file (or your OS’s equivalent) or using a browser plugin that lets you manipulate outgoing headers.
As mentioned above, most sites now use the DNS name to provide certificates and connection information. Using the IP address directly won’t work.
Interesting story, when I was in Saudi, the colonel in charge of SIPRNET (the Secret network) for Central Command was visiting and was having problems getting webmail for his SIPRNET account. Turns out the SIPR DNS servers were down. I called the network guys in Tampa and told them “Just give me the IP, I will go to it directly” They informed me that they couldn’t do that because of security (typical Army) and they would have to ask their boss. I told them “Well, he’s standing right next to me, want to ask him?” Needless to say, I got the IP and got webmail working.
(Nothing classified is in that story)
I find it strange that “the network guys in Tampa” wouldn’t give you the IP address. If the DNS servers were working, anyone who knew the domain name would instantly be supplied with the right IP address; that’s what DNS servers do.
It’s trivial to see a server’s IP address when DNS lookups are working. The Unix command “dig” does that directly. It’s not hard to get that info out of a web browser, either. But then again, maybe DNS lookups on SIPRNET work very differently from how they work on the public internet.
I was once told by a doctor’s office that they wouldn’t allow me to see my own medical records “because of HIPAA and patient privacy.” Well, I am the patient. But more importantly, HIPAA explicitly requires that my doctor’s office give me access to my own medical records. Maybe the Army network guys in Tampa were wired the same way as my doctor’s receptionist.
I too found it strange. And annoying actually. Working with Army or Navy with regards to classified networks was ALWAYS annoying
Your experience reminds me of the old joke:
What does “NSA” stand for?
“No Such Agency.”
It does use HTTPS so that is bar one. I haven’t figured out how to grab the IP address yet either to try it.
When I said this kind of thing is trivial, I meant it. There are a million tools online to look up server information, including IP addresses. Try:
Just enter the full domain of the site you’re trying to reach and go to town. By “full name” I mean all of the name up to and including the TLD. So for our board, you’d type in “boards.straightdope.com.”
Yeah, it was always fun to drive up 295 here and point to the huge NSA building and say “You don’t see a building there”
I grew up in Columbia, Maryland, only a few miles from that building whose presence can be neither confirmed nor denied. I once did an autocross race (a grassroots kind of car racing) in a parking lot that was, as I recall, inside the NSA fence. This was probably 1991 or 1992; I’m sure it would never happen today.
The thing that really blew my mind was tha{@34cdjo+8njkow&#jjw NO CARRIER
Just went a bit too far. Nice knowing you! (Hi NSA!)
Go to a command prompt (Run: CMD, in windows). Type “Ping [web address]” and you’ll get the IP address.
IIUC, several small domains may share the same IP address. (I guess the domain name and IP address are both sent.) How does that work? Could an http request to such a domain be sent without DNS?
An http request can, still, be sent to any web server using just the IP address, if known, without DNS. But, now, to get an answer, the HTTP (or HTTPS) request has to be individually crafted, including the domain name. That didn’t used to be the case: it used to be that web servers accepted any request that came to them, regardless of domain name.
Simple web servers are still like that. My IOT web servers are like that. They don’t have any particular domain name, and wouldn’t know if they did.
HTTP protocol is a simple text protocol. You send messages like:
GET
On most servers, that won’t get you anything. You have to send a request like
On servers supporting several websites, requests like
GET 192.168.1.1
…won’t get you anything, because the server won’t know that it is a request for boards.straightdope.com
As others point out, it’s called “host header” option when setting up a web server. he web server hosts multiple sites. The http(s) request arrives routed by IP address (After your computer gets the destination IP), and the main web server program looks at that GET request. It contains the actual name of the website you want to look at. If the website name matches something on the server, it serves the request from that set of website pages, and as far as you know, it’s just that <name> website.
If the website does not match anything on the server, or if it’s the raw IP, the web server can be programmed to respond appropriately. Typically an incorrect name will get “page not found” and the IP may get the same or I’ve also found that the company owning the site hosting all those other websites responds with its own advertising. (“Host your website with us!”)
I’m not an expert on HTTP protocol, so I imagine there are programs which would allow you to compose an HTTP(S) request with a name embedded and sent it to an IP address, but that is not how basic browsers operate. They take the name you type in and do their own DNS lookup.
Perhaps you could add the website host name to your computer’s HOSTS file with the appropriate IP, then the browser would not need to do a DNS lookup. Never tried this.
It’s normally the Host header line, not the GET line, which servers look at to determine which virtual host should respond to an HTTP request. It’s easy to compose a request as you describe, using curl:
curl -H Host:myhostname.com http://192.168.1.123