Answer the question
In order to leave comments, you need to log in
Why can I access a site by its domain but not by ip?
For example, there is a site
And I found out its ip on the site =
185.253.217.248
Answer the question
In order to leave comments, you need to log in
When you enter an address in a browser, something like this happens:
GET / HTTP/1.1
Host: web.site.com
Accept-Language: ru
Pay attention to the title Host
- here is the address (without further path /a/b/c/index.php
) that was entered in the browser. If you entered exactly ip, it will be there in the header Host
. Host
. Host
ip-address is in the field: to give some kind of stub, or the main, the only site.
One ip can correspond to an unlimited number of hosts. Read about the host header and dns
You need to read about virtualhosts A
webserver can support several sites, and by domain it can understand which one should be shown to the user.
The IP opens either a thread of the site specified by default, or a stub - depending on how the web server is configured
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question