Can I use another port other than 443 for HTTPS/SSL communication?

Https

Https Problem Overview


443 port is typically used for HTTPS/SSL. But is it the only option we can choose for HTTPS/SSL communication. If not, why?

Https Solutions


Solution 1 - Https

The port number is not "magic", you can use any port from 1-65535 you like. There are only 2 conditions:

  1. Both the server and the client have to (agree to) use the same port number.
  2. Ports in the range 1-1023 are "well known ports" which are assigned worldwide to specific applications or protocols. If you use one of these port numbers, you may run into conflicts with the "well known" applications. Ports from 1024 on are freely useable.

As an example, you could use port 30443 for SSL VPN if your VPN gateway supports port reassignment and the SSL VPN client (if any) does this as well. If you access SSL VPN via web portal, you can add the custom port number in the URL like this: "https://mysslvpnserver.com:30443";.
Beware that public internet feeds (hotels, hotspots) often block high ports > 1024.

Solution 2 - Https

We can use any available port for HTTPS, however, for the sake of convention, 443 and 8443 are assigned for HTTPS (browsers automatically prefix with https when these port numbers are used), but we can even run HTTPS on port 80. In this case it is our responsibility to use https (if we don't indicate it, the browser will consider it a http link).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLiangWangView Question on Stackoverflow
Solution 1 - Httpsuser1016274View Answer on Stackoverflow
Solution 2 - HttpsVinodth KumarView Answer on Stackoverflow