0

To my understanding, every time someone is hosting a service e.g. mysql server, there is always a server IP (or domain name) and a Port needed to reach the service (e.g. www.servername.com:3306).

However, when I access sites such as www.google.com or www.wikipedia.org, I 've no idea what port I am connecting to.

For instance, none of the following links www.google.com:80, www.google.com:8080 work, and the case is the same for wikipedia. So the question is:

  1. Is there a port already "embedded" in links such as google or wikipedia, or have I just not found the default port yet (i.e. it is not 80 or 8080)?

  2. Is there a general way to break a link www.somewebsite.com into a host + port combination in the form of www.somelink.com:[PORT] ?

1
  • If a service uses its "well-known port" (as managed by IANA) then specifying the port explicitly is redundant. – Zac67 Feb 8 at 10:09
2

By default, when you're accessing some site in your browser with http:// in your URL, it means you're accessing tcp/80 port. And in case of https:// - tcp/443. You can override the port by adding :<port_number> after the host name, as you already mentioned in your question, example: http://www.servername.com:8081.

2
  • 1
    The IANA maintains a port number listing for every approved protocol. iana.org/assignments/service-names-port-numbers/… – tripleee Feb 8 at 10:01
  • great, this is also the case for my example,so www.google.com:443 and www.wikipedia.org:443 works as expected. I knew about 80 for http but ignored 443 for https, thank you! – Enk9456 Feb 8 at 10:12
2

It's totally depends upon application developer decision to host application in server with any choosen specific ports .

By common application hosted ports are 443 with few of them will still use customized ports for example TCP_8081 etc

Application team is responsible to create awareness among users to use domain name or URL with hosted ports to access application .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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