1

An example of URL that links to a web hosting control panel:

http://example.com:3500

HTTP is port 80. Why does the URL use port 3500? Is it port 3500 or port 80?

2 Answers 2

3

The standard HTTP is 80. However, you could always bring up a server and configure it to serve any port with any protocol, including HTTP.

Since 80 is the standard, it can be omitted from URLs. If you indeed want to communicate over a different point (e.g., 3500, like you stated in the question), you'd have to explicitly specify it.

2
  • It is means that URL above are using port 3500 and HTTP protocol. It does not use port 80. Am I correct? Dec 21, 2014 at 9:50
  • @ChongO.K. yes, that is correct.
    – Mureinik
    Dec 21, 2014 at 10:09
2

Quite simply because you're explicitly telling your browser to use a specific port. In your specific case your URL says "connect to http://example.com over port 3500" When its not mentioned, its assumed its port 80 for HTTP (with 8080 as an alternate) and 443 as an alternate. The http / https is cause your web browser can handle multiple protocols so you need to explicitly state what protocol to use in the URI.

In many cases its useful to be able to use an arbitrary web server port either externally (to get around portblocks) or internally (to have multiple services using http with a proxy server sending data to the right service or since many systems also restrict use of ports up to 1023 to privileged users.).

Being able to set an explicit port makes sense, while having the well known port for the service implicit makes it more human friendly.

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.