0

When I type in PowerShell

ping security.stackexchange.com

...it gives me the following:

Pinging security.stackexchange.com [151.101.193.69]

And as far as I understand, this IP address corresponds to domain name security.stackexchange.com . But then I try to connect to the website using IP, it cannot establish connection and gives me an error "Unknown domain". Why?

2
  • Hi Rodion, Your question is not related to information security. You may need to transfer it to substack similar to Webmaster.
    – elsadek
    Mar 23, 2022 at 11:01
  • An IP address can point to multiple websites on the same server. When you request 151.101.193.69, you might be directed to the default website or get an error like you had. SO chooses to return you an error.
    – elsadek
    Mar 23, 2022 at 11:03

2 Answers 2

5

Because the HTTP protocol does allow multiple web sites to be hosted on one IP address. To identify the domain you want to connect to the HTTP protocol uses an header entry Host. If that entry is missing or contains just the IP address the server does not know which domain you are trying to reach and returns Unknown domain.

A full http requests that uses the IP address looks like this:

telnet 151.101.65.69 80

GET http://151.101.65.69/ HTTP/1.1
Host: security.stackexchange.com

3

You can connect using the IP. In reality, the message you are receiving indicates that you successfully connected to 151.101.193.69:

Fastly error: unknown domain: 151.101.193.69. 
    Please check that this domain has been added to a service.

This shows that you connected to a Fastly CDN server, but without telling which domain you want to access. So the Fastly server at 151.101.193.69 have no idea what you are trying to access and shows you that error.

If the IP wasn't accessible you would receive a "Connection denied" error instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .