HTTP the Definite Guide says

Before an HTTP client can send a message to a server, it needs to establish a TCP/IP connection between the client and server using Internet protocol (IP) addresses and port numbers.


In TCP, you need the IP address of the server computer and the TCP port number associated with the specific software program running on the server. This is all well and good, but how do you get the IP address and port number of the HTTP server in the first place? Why, the URL, of course! We mentioned before that URLs are the addresses for resources, so naturally enough they can provide us with the IP address for the machine that has the resource.

Where do we get URLs? From a HTTP request to be sent, or by HTTP client passing it independently of the HTTP request?


closed as unclear what you're asking by Patrick Mevzek, dan Apr 16 at 4:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Where do you get URLs?

An human either:

  • enters the URL in the address bar of its browser, because it has seen it somewhere
  • has it in its bookmark, so just selects it
  • or is visiting a website (or the results of some searches on a search engine) and clicks on a link which is a new URL.

The URL contains an hostname (could be directly in IP address but this is rare), which will be solved to an IP address through the DNS, and as for the port number, if it is not mentioned in the URL itself, the default value is 80 for HTTP and 443 for HTTPS.

Not the answer you're looking for? Browse other questions tagged or ask your own question.