arrow_back Is it possible to query a site by ip in C#?

1 vote
Hello, everyone!
Can you tell me who knows if it is possible to query a site not by domain, but by ip?

2 Answers

4 votes
Yes, do you know what a dns is?
You just write the IP instead of the domain


Is there a special way to do this? I'm trying to open a site by ip, but nothing works.
And you can't open most sites with a bare IP, because there are hundreds of them on the same host you wanted to address?
CityzenUNDEAD It is likely that that ip is no longer relevant. If it were possible to do as you describe, cloudflare would be worth a penny
freeExec Here's the thing. I need to spar the site
But it uses cloudeflare, which does not give the real ip site. I searched on this topic, and as one of the solutions offer to use the service where you can track the history of the domain. And there you can see what ip the domain had before the clodfler. Now the question is how to open the site on this ip.
2 votes
Yes, you can. Almost everywhere you can write domain name - you can write ip.
But there are nuances
1. In the comments, you write that you are trying to send a request to the ip, which was the location of the requested resource 4 years ago - most likely it is no longer there.
2. in HTTP there is a Host header and the server can simply drop those requests that are addressed to the ip, instead of the domain (this is needed in cases where one ip contains several sites)