This drives me crazy.
The Http Server receives requests on a public IP. You must add Host header to the request. a Proxy or something will direct the request to the right website using Host value.
So if you send the server Host: “example12.com
”, the server returns 404 as expected.
Very important note: There is no DNS record for example12
However, there is a specific subdomain say “drive.example12.com
”, that causes Postman to fail to send the request and log
Error: getaddrinfo ENOTFOUND drive.example12.com
If you make it a.example12.com
or drive.a.com, you will get the beautiful 404 from the server as expected.
If you add drive.example12.com
to hosts file, it works.
Both drive.a.com
and drive.example12.com
do not have DNS record. But, only in the second case, Postman fails to send the request, while obviously it tries to resolve it!!! I knew that because when I put it in the hosts file “resolving it”, Postman works normally.
And yes, I am positive that a.example12.com
and drive.a.com
do not resolve and are NOT in the hosts file.
There must be a kind of demon here!!!